Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | content/fetchers/curl.c: Defer fetch start if inside cURL | Daniel Silverstone | 2019-06-05 | 1 | -0/+16 |
| | | | | | | | | In order to cope better with modern cURL which prevents making cURL calls when inside a callback from within cURL, defer fetch start when we are processing in `fetch_curl_data()`. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org> | ||||
* | make curl fetcher log debug using NSLOG | Vincent Sanders | 2019-05-28 | 1 | -16/+26 |
| | | | | | | | stop curl fetcher logging being special case to standard error and use the fetch catagory at DEBUG level instead. The special suppress_curl_debug option is currently still obeyed | ||||
* | Curl fetcher: Force HTTP1.1 to fix HTTP2 crash. | Michael Drake | 2019-05-06 | 1 | -0/+4 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ubuntu 19.4, curl is built with HTTP2 support, and we segfault. ==18174== Invalid read of size 1 ==18174== at 0x4ACCE7D: ??? (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x4B054B1: ??? (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x4AD398A: ??? (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x4AD7A0B: ??? (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x4AE93EE: ??? (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x4AEA8A8: curl_multi_perform (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x1F2EF7: fetch_curl_poll (curl.c:1209) ==18174== by 0x1EEC5C: fetcher_poll (fetch.c:271) ==18174== by 0x2A1ED4: schedule_run (schedule.c:160) ==18174== by 0x15F941: framebuffer_run (gui.c:596) ==18174== by 0x15F941: main (gui.c:2206) ==18174== Address 0x9de95a8 is 3,224 bytes inside a block of size 6,304 free'd ==18174== at 0x483997B: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==18174== by 0x4AD497B: ??? (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x4AE158C: curl_easy_cleanup (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x1F30DE: fetch_curl_cache_handle (curl.c:761) ==18174== by 0x1F30DE: fetch_curl_stop (curl.c:840) ==18174== by 0x1F30DE: fetch_curl_done (curl.c:1122) ==18174== by 0x1F30DE: fetch_curl_poll (curl.c:1223) ==18174== by 0x1EEC5C: fetcher_poll (fetch.c:271) ==18174== by 0x2A1ED4: schedule_run (schedule.c:160) ==18174== by 0x15F941: framebuffer_run (gui.c:596) ==18174== by 0x15F941: main (gui.c:2206) ==18174== Block was alloc'd at ==18174== at 0x483AB35: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==18174== by 0x4AE165F: curl_easy_duphandle (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x1F15EB: fetch_curl_get_handle (curl.c:738) ==18174== by 0x1F15EB: fetch_curl_start (curl.c:750) ==18174== by 0x1EEB22: fetch_dispatch_job (fetch.c:156) ==18174== by 0x1EEB22: fetch_choose_and_dispatch (fetch.c:187) ==18174== by 0x1EEB22: fetch_dispatch_jobs (fetch.c:247) ==18174== by 0x1EF1BB: fetch_start (fetch.c:573) ==18174== by 0x26C779: llcache_object_refetch (llcache.c:916) ==18174== by 0x26D5E4: llcache_object_fetch (llcache.c:979) ==18174== by 0x26D5E4: llcache_object_retrieve_from_cache (llcache.c:1767) ==18174== by 0x26D5E4: llcache_object_retrieve (llcache.c:1865) ==18174== by 0x26E42C: llcache_fetch_redirect (llcache.c:2110) ==18174== by 0x26E42C: llcache_fetch_callback (llcache.c:2810) ==18174== by 0x1F1295: fetch_curl_process_headers (curl.c:922) ==18174== by 0x1F13A0: fetch_curl_data (curl.c:1324) ==18174== by 0x4ACD4C3: ??? (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) ==18174== by 0x4AE00DA: ??? (in /usr/lib/x86_64-linux-gnu/libcurl.so.4.5.0) | ||||
* | data url handler: drop logging to DEEPDEBUG. | Michael Drake | 2019-05-05 | 1 | -1/+1 |
| | |||||
* | data url handler: Keep nsurl to avoid copy. | Michael Drake | 2019-05-05 | 1 | -15/+8 |
| | |||||
* | data url handling: avoid needless allocation / copy. | Michael Drake | 2019-05-05 | 1 | -11/+2 |
| | |||||
* | data URL handler: constify some string pointers. | Michael Drake | 2019-05-05 | 1 | -2/+2 |
| | |||||
* | Curl fetcher: Jiggle logging levels. | Michael Drake | 2018-08-09 | 1 | -2/+2 |
| | |||||
* | Curl fetcher: Move poll logging from INFO to DEEPDEBUG. | Michael Drake | 2018-08-09 | 1 | -2/+2 |
| | |||||
* | HTTPS: restrict ciphersuites | John-Mark Bell | 2018-04-22 | 1 | -0/+18 |
| | |||||
* | Explicitly re-enable TLS session tickets. | John-Mark Bell | 2018-04-22 | 1 | -0/+4 |
| | | | | Libcurl disables this by default. | ||||
* | Force SSL session caching on, Ubuntu seems to have it off by default | Daniel Silverstone | 2018-04-22 | 1 | -0/+3 |
| | |||||
* | Revert "Disable SSL session ID caching." | Daniel Silverstone | 2018-04-22 | 1 | -3/+0 |
| | | | | This reverts commit debe0e345bf453a58bf319a84d5845cce6b38d8e. | ||||
* | Use coccinelle to change logging macro calls in c files | Vincent Sanders | 2017-09-06 | 3 | -39/+64 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done @@ expression E; @@ -LOG(E); +NSLOG(netsurf, INFO, E); @@ expression E, E1; @@ -LOG(E, E1); +NSLOG(netsurf, INFO, E, E1); @@ expression E, E1, E2; @@ -LOG(E, E1, E2); +NSLOG(netsurf, INFO, E, E1, E2); @@ expression E, E1, E2, E3; @@ -LOG(E, E1, E2, E3); +NSLOG(netsurf, INFO, E, E1, E2, E3); @@ expression E, E1, E2, E3, E4; @@ -LOG(E, E1, E2, E3, E4); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4); @@ expression E, E1, E2, E3, E4, E5; @@ -LOG(E, E1, E2, E3, E4, E5); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5); @@ expression E, E1, E2, E3, E4, E5, E6; @@ -LOG(E, E1, E2, E3, E4, E5, E6); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6); @@ expression E, E1, E2, E3, E4, E5, E6, E7; @@ -LOG(E, E1, E2, E3, E4, E5, E6, E7); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7); | ||||
* | create netsurf inttypes header to have portable integer formatting macros | Vincent Sanders | 2017-01-21 | 3 | -0/+3 |
| | |||||
* | Fix OpenSSL X509 cert API detection | Vincent Sanders | 2016-11-21 | 1 | -2/+4 |
| | | | | | LibreSSL defines a OPENSSL_VERSION_NUMBER of 2.1 but only provides the old OpenSSL 1.0.x API. | ||||
* | fix openSSL 1.1.0 X509 certificate handling | Vincent Sanders | 2016-11-20 | 1 | -9/+23 |
| | |||||
* | fix unecessary base64 header include | Vincent Sanders | 2016-11-19 | 1 | -1/+1 |
| | |||||
* | Remove internal BASE64 in favour of nsutils' one | Daniel Silverstone | 2016-11-19 | 1 | -3/+6 |
| | |||||
* | document file fetcher being locale dependant | Vincent Sanders | 2016-09-10 | 1 | -1/+5 |
| | |||||
* | Buildsystem: Make curl/openssl usage build-time options. | Michael Drake | 2016-08-13 | 1 | -2/+4 |
| | |||||
* | URL unescape: return the new length to the caller. | Michael Drake | 2016-07-24 | 1 | -3/+2 |
| | | | | | | | | The avoids situations were we threw away the length, only for the caller to have to strlen the returned string. Note, there seems to be a case of the amiga front end writing beyond end of allocation. Added a TODO for now. | ||||
* | Data URL handling: Use url_unescape rather than curl. | Michael Drake | 2016-07-24 | 1 | -13/+10 |
| | |||||
* | Whitespace: Convert spaces to tab for indent. | Michael Drake | 2016-07-24 | 1 | -3/+3 |
| | |||||
* | Refactor the fdset acquisition into the fetchers to stop fetch.c including ↵ | Daniel Silverstone | 2016-06-27 | 1 | -0/+18 |
| | | | | curl.h | ||||
* | Fix handling of certificate chains | Vincent Sanders | 2016-06-27 | 1 | -145/+251 |
| | | | | | | | When processing a x509 certificate chain from openssl it is necessary to allow teh entire chain to be processed rather than halting processing at the first certificate with an error. This allows errors with a certificate authority to be examined. | ||||
* | Allow include directories to be added by sub makefiles | Vincent Sanders | 2016-06-06 | 1 | -1/+1 |
| | |||||
* | Update content to split public and internal API | Vincent Sanders | 2016-06-06 | 1 | -1/+0 |
| | |||||
* | move fetch header into public API | Vincent Sanders | 2016-05-30 | 3 | -3/+3 |
| | |||||
* | move misc header into public API | Vincent Sanders | 2016-05-30 | 1 | -1/+1 |
| | |||||
* | move image content handlers to accomodate core build changes | Vincent Sanders | 2016-05-23 | 1 | -1/+1 |
| | |||||
* | remove all core usage of warn_user API | Vincent Sanders | 2016-04-26 | 1 | -1/+2 |
| | |||||
* | need strings.h for strncasecmp on freebsd | Vincent Sanders | 2016-04-21 | 2 | -0/+2 |
| | |||||
* | Split utils header into string functions and everything else | Vincent Sanders | 2016-04-21 | 5 | -63/+25 |
| | | | | | split out the string handling API from the rest of the utils header and fix up all the fallout. | ||||
* | remove curl fetchers use of the wallclock API | Vincent Sanders | 2016-04-19 | 1 | -13/+15 |
| | | | | | | | | | | The wallclock() API uses gettimeofday which can be affected by the the systems clock being changed etc. The curl fetcher usage of this API is to generate a timing delta and does not cope with the gettimeofday issues. This changes the fetcher to use the nsutils library monotonic time function which does not suffer from the issues with gettimeofday. | ||||
* | move dir_sort_alpha function from generic utils to one specific place it is used | Vincent Sanders | 2016-04-19 | 1 | -0/+43 |
| | |||||
* | Reduce unecessary use of directory entry headers | Vincent Sanders | 2016-04-19 | 3 | -4/+3 |
| | | | | | | | The config header was causing many source files to unecessarily include the dirent headers causing extra dependancies. This has been fixed by providing a utility dirent header that provides a common API across all platforms while removing the unecessary dirent header usage. | ||||
* | Reduce unecessary use of networking headers | Vincent Sanders | 2016-04-17 | 1 | -1/+2 |
| | | | | | | | | The utility configuration header dragged in a number of bsd sockets and related API as a side effect of setting up the configuration. By splitting the header and API setup into a separate header only the small number of places that need the functionality explitly include it. | ||||
* | Fix size_t printf formatting | Vincent Sanders | 2016-03-17 | 3 | -18/+30 |
| | | | | | | | The printf formatting for size_t is set in c99 as %zu but in windows it is %Iu this is solved by adding and inttypes style PRI macro for size_t This also uses this macro everywhere size_t is formatted. | ||||
* | Tiny simplification of curl debug logging. | Michael Drake | 2016-01-21 | 1 | -1/+1 |
| | |||||
* | Add extra logging to curl poll fn when not suppressing curl debug. | Michael Drake | 2015-11-11 | 1 | -0/+38 |
| | |||||
* | Add support for retrying timed-out cURL fetches. | Daniel Silverstone | 2015-11-10 | 1 | -4/+12 |
| | | | | | | | | | | | | | This is an attempt to amelioriate the situation found in #2384 where we see the cURL connect() failing to complete. Based on the pcap from the bug log, we believe that RISC OS is likely failing to signal the completion of the connection to cURL. As such, cURL times out. This change permits retries of timed out connections in the hope that a fresh socket FD might subsequently function correctly. The defaults chosen mean that the previous behaviour of 30 seconds before timeout is reported will remain the same, but in that time we will make 3 separate attempts to connect the socket. | ||||
* | Allow the resource scheme to provide data directly. | Vincent Sanders | 2015-06-17 | 1 | -48/+151 |
| | | | | | | This allows front ends to provide resources from compiled in data instead of requiring the resources to be available on disc and forcing a redirect. | ||||
* | Change LOG() macro to be varadic | Vincent Sanders | 2015-05-28 | 2 | -39/+31 |
| | | | | | | | | | | | | This changes the LOG macro to be varadic removing the need for all callsites to have double bracketing and allows for future improvement on how we use the logging macros. The callsites were changed with coccinelle and the changes checked by hand. Compile tested for several frontends but not all. A formatting annotation has also been added which allows the compiler to check the parameters and types passed to the logging. | ||||
* | Move win32 window operations into their own module | Vincent Sanders | 2015-03-12 | 1 | -1/+2 |
| | | | | | | This splits up a great deal of the win32 window code out from other gui code. It also remove large quantities of unused and junk variables and functions. | ||||
* | Fix my spelling of teh everywhere | Vincent Sanders | 2014-11-18 | 1 | -1/+1 |
| | |||||
* | Improve data scheme fetcher allocation | Vincent Sanders | 2014-11-17 | 1 | -10/+8 |
| | | | | | | The data scheme fetcher was over allocating the space for decoded base64 encoded urls and not using the base64 API that allocated the correct size storage. | ||||
* | Remove unecessary form debug | Vincent Sanders | 2014-11-15 | 1 | -1/+1 |
| | | | | | Additionaly we make the curl fetcher report errors instead of uninitialised buffer. | ||||
* | Doxygen cleanups | Vincent Sanders | 2014-11-09 | 1 | -3/+3 |
| | |||||
* | Improve Doxygen documentation | Vincent Sanders | 2014-11-08 | 1 | -2/+7 |
| |