Commit Graph

46 Commits

Author SHA1 Message Date
Daniel Silverstone 6c9e4bea8e Purge FETCH_TYPE which is unused throughout NetSurf. Clearing a todo in llcachec.
svn path=/trunk/netsurf/; revision=10300
2010-04-08 12:16:52 +00:00
Michael Drake bbd757c34a Fix fetch_curl_post_convert() for filename_from_path() returning NULL.
svn path=/trunk/netsurf/; revision=10265
2010-04-07 11:10:55 +00:00
Vincent Sanders 95e4a737de rationalise the usage of the file scheme
svn path=/trunk/netsurf/; revision=10221
2010-03-31 13:59:57 +00:00
Daniel Silverstone 270ef59a98 Merge jmb/new-cache; r=dsilvers,rs=vince
svn path=/trunk/netsurf/; revision=10180
2010-03-28 12:56:39 +00:00
Chris Young 033b5d815a Move code which extracts the filename from a given path into frontend.
svn path=/trunk/netsurf/; revision=10139
2010-03-21 13:32:59 +00:00
John Mark Bell ee833877c5 Rate limit fetch progress notifications.
svn path=/trunk/netsurf/; revision=9962
2010-02-10 00:32:12 +00:00
Vincent Sanders 6990c2cd04 remove uneccissary includes
svn path=/trunk/netsurf/; revision=9931
2010-01-29 11:32:53 +00:00
James Bursa 914eedc11d Don't set proxy option for file: URLs to workaround some versions of libcurl attempting to use it (fixed in latest libcurl). Also unset curl proxy option if it's disabled so the previous xfer's setting isn't retained.
svn path=/trunk/netsurf/; revision=9759
2009-12-25 19:27:22 +00:00
John Mark Bell 355799ce0b Merge branches/MarkieB/gtkmain to trunk.
svn path=/trunk/netsurf/; revision=9729
2009-12-17 23:55:02 +00:00
John Tytgat 2261b616f6 - content/urldb.c(auth_data): Removed;
(prot_space_data): Added, it lives linked in the leaf host_part
  struct and together with its scheme and port (which defins canonical root
  url) and realm this defines a protection space.
  (path_data): Removed auth_data field and replaced by a prot_space_data
  pointer.
  (host_part::prot_space): Added linked list of protection space data
  structs.
  (urldb_get_auth_details): Given an URL fetch fetches its auth.
  (urldb_set_auth_details): Creates or updates the contents of a
  protection space to which given URL belongs.
  (urldb_destroy_host_tree): Delete protection data space structures
  using urldb_destroy_prot_space.
  (urldb_destroy_prot_space): Added.
- content/urldb.h(urldb_get_auth_details): Added realm parameter.
- content/fetchers/fetch_curl.c(fetch_curl_set_options): Update
  urldb_get_auth_details call (we don't know realm at this point).
- content/fetchcache.c(fetchcache_callback, fetchcache_auth): At FETCH_AUTH,
  use realm to determine if we really don't know auth data and if so,
  refetch content.
- content/content.h(struct content): Add content::tried_with_auth.
- content/content.c(content_create): Initialize content::tried_with_auth.
- riscos/401login.c(ro_gui_401login_open): Show known authentication
  data in dialogue so user can see what was wrong with it and correct it.

Solves bug #2830829.

svn path=/trunk/netsurf/; revision=9045
2009-08-04 23:02:23 +00:00
John Mark Bell 243c1ba03f Limit scope of manually-defined NDEBUG. Purge a bunch of redundant #undef NDEBUG.
svn path=/trunk/netsurf/; revision=7593
2009-05-28 10:39:53 +00:00
John Mark Bell 42e24e8099 s/abort/abort_fetch/
svn path=/trunk/netsurf/; revision=7512
2009-05-14 10:13:20 +00:00
John Mark Bell b98f105b24 Purge WITH_AUTH
svn path=/trunk/netsurf/; revision=6600
2009-02-22 15:13:10 +00:00
John Mark Bell 847b776285 Purge NETSURF_USE_SSL and WITH_SSL
svn path=/trunk/netsurf/; revision=6599
2009-02-22 15:07:50 +00:00
John Mark Bell 16c01d97e9 Log detected state of openssl availability
svn path=/trunk/netsurf/; revision=6595
2009-02-21 23:04:49 +00:00
John Mark Bell 756c393abb Given that the build-time SSL detection can be somewhat inaccurate, attempt to determine whether we can use the SSL_CTX stuff at runtime.
svn path=/trunk/netsurf/; revision=6586
2009-02-21 02:46:47 +00:00
John Mark Bell f7f19ab0ed Squash strict-aliasing warning in the most disgusting way possible.
svn path=/trunk/netsurf/; revision=6070
2009-01-15 16:00:16 +00:00
Daniel Silverstone 4e3951660f Silence a bunch of warnings caused by cURL's typecheck-gcc stuff being strict and in one case cURL simply being daft (whoever heard of a signed HTTP response code?).
svn path=/trunk/netsurf/; revision=5991
2009-01-08 10:36:11 +00:00
Daniel Silverstone 5c01ca3306 Better, safer fix for the type punning issue
svn path=/trunk/netsurf/; revision=5562
2008-10-13 16:39:54 +00:00
Daniel Silverstone 1108d1d1c5 Fix type-punning warning in fetch_data.c
svn path=/trunk/netsurf/; revision=5561
2008-10-13 16:27:45 +00:00
Daniel Silverstone ac427e05e5 Add additional debug to fetch errors from cURL
svn path=/trunk/netsurf/; revision=5174
2008-08-22 11:10:33 +00:00
François Revel f28f4cc760 First round of C89 fixes. Those should be obvious, hope I didn't introduce any side effect.
svn path=/trunk/netsurf/; revision=4788
2008-07-29 09:05:36 +00:00
James Bursa 3d590b1efa Handle errors returned by curl_multi_perform(), such as out of memory, instead of exiting.
svn path=/trunk/netsurf/; revision=4329
2008-06-14 21:43:52 +00:00
James Bursa ef6690ad72 Stop processing headers and sending FETCH_HEADER if fetch was aborted.
svn path=/trunk/netsurf/; revision=4231
2008-05-31 16:52:37 +00:00
John Mark Bell f4be61553c Fix handling of cache control data
svn path=/trunk/netsurf/; revision=4227
2008-05-30 11:09:50 +00:00
James Bursa ae992eab4d Add new fetch callback FETCH_HEADER for headers and move as much header parsing as possible from fetch_curl.c to fetchcache.c. This simplifies fetch_curl.c and will make it possible to store response headers in future.
svn path=/trunk/netsurf/; revision=4226
2008-05-30 04:11:16 +00:00
John Tytgat 793d466edf - introduction of SLEN()
- enforce result of url_normalize() being NULL on failure
- plug memory leak when url_normalize() fails

svn path=/trunk/netsurf/; revision=4200
2008-05-25 15:51:30 +00:00
John Mark Bell c24b426881 No longer suppress the default Accept: header.
This fixes all those sites that brokenly assume that it's required and thus break when the client doesn't send one (here's looking at you royalmail.com).
libcurl's default Accept header is "*/*", which is semantically equivalent to not sending a header at all (no header implies the client accepts all content types).

svn path=/trunk/netsurf/; revision=4196
2008-05-24 10:09:02 +00:00
John Mark Bell 74a1095cd6 Remove unnecessary includes
svn path=/trunk/netsurf/; revision=4144
2008-05-11 10:09:44 +00:00
John Mark Bell d260420249 Squash warning
svn path=/trunk/netsurf/; revision=3983
2008-03-19 17:36:07 +00:00
Rob Kendrick fed99c2cb5 jmb's rework of data: URL handling
svn path=/trunk/netsurf/; revision=3890
2008-03-06 11:28:00 +00:00
Rob Kendrick 58ee433b67 Add another check for malformed data: URLs
svn path=/trunk/netsurf/; revision=3889
2008-03-05 23:09:36 +00:00
Rob Kendrick b168d636d0 Many data: fixes. Acid2 no longer crashes NetSurf.
svn path=/trunk/netsurf/; revision=3888
2008-03-05 22:57:46 +00:00
Rob Kendrick c9bd38f5dd Check for calloc() failing
svn path=/trunk/netsurf/; revision=3885
2008-03-05 15:01:42 +00:00
Rob Kendrick 0e43415013 Use curl_free() when freeing data: URLs that are URL-encoded instead of using free()
svn path=/trunk/netsurf/; revision=3884
2008-03-05 14:57:33 +00:00
Rob Kendrick 8e79665248 Initial attempt at implementing data: URLs. Needs cleaning and verifying that I'm using the fetcher API correctly. Appears to work, though.
svn path=/trunk/netsurf/; revision=3882
2008-03-05 14:21:29 +00:00
John Mark Bell cc3481a2ff Make core fetching code handle verifiability of transactions
Make core fetching code be responsible for inserting cookies into the urldb
Provide accessor to a fetch's parent url (this is defined as being the URL of the verifiable fetch which caused this one to occur)
Make fetchcache's 3xx handling use the parent url when spawning new fetches

svn path=/trunk/netsurf/; revision=3809
2008-01-30 19:56:41 +00:00
Vincent Sanders 2f864eeecc Update all source code file headers to reflect GPL version 2 only and contain appropriate licence text
svn path=/trunk/netsurf/; revision=3486
2007-08-08 16:16:03 +00:00
John Mark Bell 40b1c80896 Ensure option strings aren't blank before setting headers: previously, a blank option string could result in "Accept-Language: , *;q=0.1" being sent, for example.
svn path=/trunk/netsurf/; revision=3450
2007-07-21 08:53:00 +00:00
James Bursa 594eb74c4c Fix deadlock when fetching stylesheets when max_fetchers_per_host is reached by splitting fetch_can_be_freed() into fetch_remove_from_queues() and fetch_free().
svn path=/trunk/netsurf/; revision=3380
2007-07-04 18:44:13 +00:00
James Bursa 960c11de1a Rename register_curl_fetchers() to fetch_curl_register(). Add declarations for static functions and reorder functions.
svn path=/trunk/netsurf/; revision=3379
2007-07-04 18:05:16 +00:00
Daniel Silverstone e2d0019119 Add option_suppress_curl_debug and default it to true
svn path=/trunk/netsurf/; revision=3373
2007-06-27 16:27:52 +00:00
Daniel Silverstone 82c4458689 Only pass option_ca_bundle and option_ca_path to cURL if they are non-empty.
svn path=/trunk/netsurf/; revision=3372
2007-06-27 16:13:54 +00:00
Daniel Silverstone e91cfc8e47 Add ca_path option which sets CURLOPT_CAPATH.
svn path=/trunk/netsurf/; revision=3369
2007-06-27 15:39:56 +00:00
John Mark Bell 87ca206e13 Warning fixes.
svn path=/trunk/netsurf/; revision=3332
2007-06-10 18:08:22 +00:00
Daniel Silverstone 1dd7e97eb3 Merge scheme switcher branch in.
svn path=/trunk/netsurf/; revision=3330
2007-06-10 17:46:44 +00:00