Commit Graph

1397 Commits

Author SHA1 Message Date
Michael Drake
c14f01ea44 File fetcher: Optimise HTTP header generation. 2019-11-10 14:37:36 +00:00
Michael Drake
8d652f1ff4 Resource fetcher: Optimise HTTP header generation. 2019-11-10 14:37:34 +00:00
Michael Drake
301b0bae00 llcache: URLs with data scheme are cachable. 2019-11-10 14:36:40 +00:00
Michael Drake
66401b7fa6 Resource fetcher: Add Cache-Control header with max-age of a year.
Resource URLs can't change, we want to assume they're fresh for
as long as we can.
2019-11-10 14:36:40 +00:00
Michael Drake
ab4eab5706 Data fetcher: Add Cache-Control header with max-age of a year.
Data URLs can't change, we want to assume they're fresh for
as long as we can.
2019-11-10 14:36:40 +00:00
Michael Drake
0dfbc80587 Data fetcher: Split header emitting out into helper. 2019-11-10 14:36:40 +00:00
Michael Drake
58094ffaa5 Data fetcher: Move fetch_data_send_callback towards top of file. 2019-11-10 11:58:38 +00:00
Michael Drake
885897f610 llcache: Uncachable scheme checks don't need to be caseless. 2019-11-09 17:14:37 +00:00
Michael Drake
52805a7860 llcache: Allow file and resource schemes to be cached.
This means things like the default css file and adblock css file
are only loaded and parsed once.
2019-11-09 17:08:43 +00:00
Michael Drake
b15cbb72ac File fetcher: Avoid atoi for If-None-Match value parse.
The file fetcher emits FETCH_NOTMODIFIED if the file is unchanged.
2019-11-09 17:06:04 +00:00
Michael Drake
c92b31babe Resource fetcher: Fix ETag handling.
* Changed ETag storage to be time_t, rather than int.
* Changed `If-None-Match` value parsing to use proper
  time_t parsing, rather than `atoi`.

We emit FETCH_NOTMODIFIED if the resource hasn't changed.
2019-11-09 16:59:26 +00:00
Vincent Sanders
e95c11dac8 remove user warning and log error instead 2019-11-07 21:35:24 +00:00
Vincent Sanders
0dbc6e5ecd fix keypress entry on text area
accidentaly broken in commit fca421e204
2019-11-07 21:20:04 +00:00
Vincent Sanders
570f2dc036 remove user warning and fix up error handling in form select menus 2019-11-07 18:52:49 +00:00
Vincent Sanders
7de3100624 remove unecessary user warning 2019-11-06 23:26:48 +00:00
Vincent Sanders
fca421e204 remove user warning and propogate error return 2019-11-06 23:13:20 +00:00
Vincent Sanders
cbb0c05258 remove unecessary user warning calls and improve error propogation in html box 2019-11-05 23:05:42 +00:00
Vincent Sanders
78aa34e5d7 remove user warnings from hotlist load and curl poll 2019-11-05 00:07:06 +00:00
Vincent Sanders
4eb06ad2cf move the fallback text for about handler into messages handler 2019-10-30 21:33:27 +00:00
Vincent Sanders
4b0c3f0efe add internal query handler for fetch errors
Any errors from the fetch which are not already handled are
  reported with an internal query page instead of a modal
  dialog.

This is much less invasive for the user and much more in
  keeping with how this is handled by other browsers.

The handler is similar to the timeout handler but the
  functionality is kept separate as it is intended timeout
  handling be extended in future.
2019-10-30 18:56:38 +00:00
Vincent Sanders
76eac19227 add internal query page for request timeouts 2019-10-29 22:29:22 +00:00
Vincent Sanders
1176ce4271 Improve timeout error messaging 2019-10-28 23:50:01 +00:00
Daniel Silverstone
a5766db2b9 fetchers/curl: Restrict AUTH to BASIC
cURL will prevent channel reuse if NTLM auth is enabled because
NTLM authenticates a channel not a request.  As such we were
unable to reuse curl handles since we handed off connection
reuse to curl instead of our own handle cache.  This mitigates
the effect, though curl authors are looking at fixing it upstream
too.

Fixes: #2707

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-10-21 10:03:46 +01:00
Vincent Sanders
4372104e0e fix utils configuration header ordering 2019-10-11 17:39:33 +01:00
Vincent Sanders
972e13ca3f remove unused external declaration and unecessary header use 2019-10-06 18:02:17 +01:00
Vincent Sanders
c9296f79a8 Use curl API (versions after 7.56.0) to determine if openssl is in use 2019-10-01 21:23:35 +01:00
Vincent Sanders
0a3786fed2 Allow the curl fetcher to be built without openssl.
The curl fetcher can operate without openssl library being
 available, additionaly curl itself may be compiled with a
 different TLS library.

In either case this will simply cause the "unknown" error to be
 reported for all TLS failiures and page information to lack any
 certificate information.
2019-09-30 23:57:49 +01:00
Vincent Sanders
12cca32059 fix core find in page behaviour when case sensitivity is toggled 2019-09-21 10:53:41 +01:00
Vincent Sanders
d94afaa0e1 make the gtk_search structure private to teh gtk search object 2019-09-21 10:53:41 +01:00
Daniel Silverstone
b03786920a hlcache_fini(): Deschedule cleanups on finalisation
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-09-07 15:23:45 +01:00
Daniel Silverstone
524965b867 Box Conversion: Cancel conversion during html_destroy
If dom_to_box is still in progress when we destroy an HTML
content, we need to cancel the conversion otherwise we will
end up with a scheduled callback into infinity.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-23 21:58:07 +01:00
Daniel Silverstone
df496cc8bc Window: set{Timeout,Interval}() default delay 10ms
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-21 21:46:52 +01:00
Daniel Silverstone
44f3846727 SSL Error: Enable OpenSSL hostname verification
Since OpenSSL 1.0.2 there has been hostname verification support
which cURL doesn't turn on for some reason.  Turn it on so that
we get better hostname verification handling.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-14 20:11:11 +01:00
Vincent Sanders
820fb0e7ff add English message text for ssl errors 2019-08-10 12:51:46 +01:00
Vincent Sanders
98f4525073 add common name ssl certificate error
This adds an ssl faliure code and explanation why curl fetcher
 does not currently set it.
2019-08-10 12:50:23 +01:00
Michael Drake
c6a2c76867 About: Tweak the new about query page renderng. 2019-08-09 13:20:08 +01:00
Vincent Sanders
3a23e944dd rework about scheme handlers to be consistant with output buffer handling 2019-08-08 17:12:42 +01:00
Vincent Sanders
746010a757 apply tlsa styling improvements to about scheme query pages 2019-08-07 16:05:45 +01:00
Vincent Sanders
1b030bd8de add basic styling to about scheme privacy query page 2019-08-07 14:19:37 +01:00
Vincent Sanders
8cec045cb7 Improve the about scheme query page generation be be bounds safe 2019-08-06 13:16:20 +01:00
Daniel Silverstone
1cf1ec55bc Support SSL verification through new about: handler
In doing this, also propagate why the certificates were bad
so that the page can display a reason.  We will need FatMessages
for all these.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-06 13:15:23 +01:00
Daniel Silverstone
8469f4cc8e Reimplement handling of BAD_AUTH inside browser_window
We now handle authentication requests via an `about:` page
which presents a nice form built into the browser window.
In order to do this, we add internal navigation as a concept
to the browser window and we strip the 401login support from all
frontends except monkey.

The 401login callback is now intended for password safe type support
rather than an immediately interactive prompt.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-06 11:26:47 +01:00
Vincent Sanders
9c9c26a308 futher refinement on about scheme query styling 2019-08-06 10:51:31 +01:00
Vincent Sanders
6a1c64ff7b improve css formatting in about scheme query handlers 2019-08-06 10:07:35 +01:00
Vincent Sanders
ea549da8df fix url reference counting in about scheme query handlers 2019-08-06 10:07:35 +01:00
Michael Drake
5e45c4498c HTML: Don't allow objects to redraw until we have a layout. 2019-08-06 09:42:37 +01:00
Vincent Sanders
c238325b12 add about scheme query handlers 2019-08-06 08:45:56 +01:00
Vincent Sanders
a888922612 Improve about scheme doc comments and formatting 2019-08-05 22:29:14 +01:00
Daniel Silverstone
ddfa76b1fc curl.c: Don't use OpenSSL 1.1 only serialNumber fetcher
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 22:03:42 +01:00
Daniel Silverstone
f3ac1fad69 nssprite: content_broadcast_error fix
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2019-08-05 21:33:46 +01:00