aboutsummaryrefslogtreecommitdiff
path: root/lib/http.c
AgeCommit message (Collapse)Author
2011-08-13http NTLM: change return type of Curl_input_ntlm() to CURLcodeYang Tse
Remove CURLntlm enum, no longer required.
2011-07-31NTLM single-sign on adjustments (VIII)Yang Tse
Use preprocessor symbols WINBIND_NTLM_AUTH_ENABLED and WINBIND_NTLM_AUTH_FILE for Samba's winbind daemon ntlm_auth helper code implementation and filename. Retain preprocessor symbol USE_NTLM_SSO for NTLM single-sign-on feature availability implementation independent. For test harness, prefix NTLM_AUTH environment vars with CURL_ Refactor and rename configure option --with-ntlm-auth to --enable-wb-ntlm-auth[=FILE]
2011-07-26fix compiler warningYang Tse
2011-07-26fix compiler warningYang Tse
2011-07-26stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.hYang Tse
2011-07-25WIN32 io.h and fcntl.h inclusion done in setup_once.hYang Tse
2011-07-25time.h and sys/time.h inclusion conditionally done in setup_once.hYang Tse
2011-07-20http error response: stop sending when error is receivedDaniel Stenberg
When libcurl has said to the server that there's a POST or PUT coming (with a content-length and all) it has to either deliver that amount of data or it needs to close the connection before trying a second request. Adds test case 1129, 1130 and 1131 The bug report is about when used with 100-continue, but the change is more generic. Bug: http://curl.haxx.se/mail/lib-2011-06/0191.html Reported by: Steven Parkes
2011-07-18NTLM single-sign on supportedMandy Wu
With the use of the 'ntlm_auth' tool from the Samba project
2011-07-01Curl_http_readwrite_headers: minor indent fixDaniel Stenberg
2011-06-21http: fix compiler warningYang Tse
compiler warning: conditional expression is constant
2011-06-03privatise: make private functions staticDaniel Stenberg
2011-05-05RTSP: cleanupsDaniel Stenberg
Made several functions static Made one function defined to nothing when RTSP is disabled to avoid the #ifdefs in code. Removed explicit rtsp.h includes
2011-05-05RTSP: convert protocol-specific checks to genericDaniel Stenberg
Add a 'readwrite' function to the protocol handler struct and use that for the extra readwrite functionality RTSP needs.
2011-05-05SSL: check for SSL, not specific protocolsDaniel Stenberg
Code cleanup to check less for protocols and more for the specific relevant feature. Like if SSL is required.
2011-05-05http_perhapsrewind: remove HTTP checkDaniel Stenberg
No need to check for HTTP as this is now a HTTP-specific function
2011-05-05http_perhapsrewind:Daniel Stenberg
make it static, remove Curl_ prefix
2011-04-28cleanup: remove old unused debug codeDaniel Stenberg
2011-04-27whitespace cleanup: no space first in conditionalsDaniel Stenberg
"if(a)" is our style, not "if( a )"
2011-04-27source cleanup: unify look, style and indent levelsDaniel Stenberg
By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
2011-04-20Curl_http_connect: detect HTTPS properly after CONNECTDaniel Stenberg
libcurl failed to check the correct struct for HTTPS after CONNECT was issued to the proxy, so it didn't do the TLS handshake and subsequently failed the connection. A regression released in 7.21.5 (introduced around commit 8831000bc07de). Bug: http://curl.haxx.se/mail/lib-2011-04/0134.html Reported by: Josue Andrade Gomes
2011-04-20CURL_DOES_CONVERSIONS: cleanupDaniel Stenberg
Massively reduce #ifdefs all over (23 #ifdef lines less so far) Moved conversion-specific code to non-ascii.c
2011-04-18transfer-encoding: added new option and cmdlineDaniel Stenberg
Added CURLOPT_TRANSFER_ENCODING as the option to set to request Transfer Encoding in HTTP requests (if built zlib enabled). I also renamed CURLOPT_ENCODING to CURLOPT_ACCEPT_ENCODING (while keeping the old name around) to reduce the confusion when we have to encoding options for HTTP. --tr-encoding is now the new command line option for curl to request this, and thus I updated the test cases accordingly.
2011-04-18TE: do the Connection: headerDaniel Stenberg
When TE: is inserted in the request, we must add a "Connection: TE" as well to be HTTP 1.1 compliant. If a custom Connection: header is passed in, we must use that and only append TE to it. Test case 1125 verifies TE: + custom Connection:.
2011-04-18TE: rename struct field content_encodingDaniel Stenberg
Since this struct member is used in the code to determine what and how to decode automatically and since it is now also used for compressed Transfer-Encodings, I renamed it to the more suitable 'auto_decoding'
2011-04-18HTTP: add support for gzip and deflate Transfer-EncodingDaniel Stenberg
Transfer-Encoding differs from Content-Encoding in a few subtle ways, but primarily it concerns the transfer only and not the content so when discovered to be compressed we know we have to uncompress it. There will only arrive compressed transfers in a response after we have requested them with the appropriate TE: header. Test case 1122 and 1123 verify.
2011-04-04http-proxy: move proxy code to http_proxy.cDaniel Stenberg
The new http_proxy.* files now host HTTP proxy specific code (500+ lines moved out from http.c), and as a consequence there is a macro introduced for the Curl_proxyCONNECT() function so that code can use it without actually supporting proxy (or HTTP) in builds.
2011-03-14protocols: use CURLPROTO_ internallyDaniel Stenberg
The PROT_* set of internal defines for the protocols is no longer used. We now use the same bits internally as we have defined in the public header using the CURLPROTO_ prefix. This is for simplicity and because the PROT_* prefix was already used duplicated internally for a set of KRB4 values. The PROTOPT_* defines were moved up to just below the struct definition within which they are used.
2011-03-14protocol handler: added flags fieldDaniel Stenberg
The protocol handler struct got a 'flags' field for special information and characteristics of the given protocol. This now enables us to move away central protocol information such as CLOSEACTION and DUALCHANNEL from single defines in a central place, out to each protocol's definition. It also made us stop abusing the protocol field for other info than the protocol, and we could start cleaning up other protocol-specific things by adding flags bits to set in the handler struct. The "protocol" field connectdata struct was removed as well and the code now refers directly to the conn->handler->protocol field instead. To make things work properly, the code now always store a conn->given pointer that points out the original handler struct so that the code can learn details from the original protocol even if conn->handler is modified along the way - for example when switching to go over a HTTP proxy.
2011-03-13GSS: handle reuse fixMarcus Sundberg
Make GSS authentication work when a curl handle is reused for multiple authenticated requests, by always setting negdata->state in output_auth_headers(). Signed-off-by: Marcus Sundberg <marcus.sundberg@aptilo.com>
2011-03-08SSL: (part 2) Added CyaSSL to SSL abstraction layerTodd A Ouska
This is the modified existing files commit.
2011-02-25http: removed wrong unused comment.Julien Chaffraix
|premature| is used in Curl_http_done.
2011-02-25http: removed code duplication for stubbed https_getsock function.Julien Chaffraix
2011-02-07Curl_gmtime: added a portable gmtimeDaniel Stenberg
Instead of polluting many places with #ifdefs, we create a single place for this function, and also check return code properly so that a NULL pointer returned won't cause problems.
2011-01-25HTTP: memory leak on multiple Location:Daniel Stenberg
The HTTP parser allocated memory on each received Location: header without properly freeing old data. Starting now, the code only considers the first Location: header and will blissfully ignore subsequent ones. Bug: http://curl.haxx.se/bug/view.cgi?id=3165129 Reported by: Martin Lemke
2011-01-07HTTP: HTTP Negotiate authentication using SSPIMarcel Roelofs
Only under Windows
2010-12-15Preparing for axTLS. Actual SSL API functions are only stubbed.Eric Hu
Added axTLS to autotool files and glue code to misc other files. axtls.h maps SSL API functions, but may change. axtls.c is just a stub file and will definitely change.
2010-12-04fix compiler warning: conversion may lose significant bitsYang Tse
2010-11-05Revert: use Host: name for SNI and cert name checksDaniel Stenberg
This reverts commit b0fd03f5b8d4520dd232a9d13567d16bd0ad8951, 4b2fbe1e97891f, afecd1aa13b4f, 68cde058f66b3
2010-11-04host: get the custom Host: name more genericlyDaniel Stenberg
When given a custom host name in a Host: header, we can use it for several different purposes other than just cookies, so we rename it and use it for SSL SNI etc.
2010-10-20formdata: provide error messageDaniel Stenberg
When failing to build form post due to an error, the code now does a proper failf(). Previously libcurl would report an error like "failed creating formpost data" when a file wasn't possible to open which was not easy for users to figure out. I also lower cased a function name to be named more curl-style and removed some unnecessary code.
2010-10-02HTTP: remove special case for 416Daniel Stenberg
It was pointed out that the special case libcurl did for 416 was incorrect and wrong. 416 is not really different to other errors so the response body must be handled like for other errors/http responses. Reported by: Chris Smowton Bug: http://curl.haxx.se/bug/view.cgi?id=3076808
2010-08-25http: handle trailer headers in all chunked responsesDaniel Stenberg
HTTP allows that a server sends trailing headers after all the chunks have been sent WITHOUT signalling their presence in the first response headers. The "Trailer:" header is only a SHOULD there and as we need to handle the situation even without that header I made libcurl ignore Trailer: completely. Test case 1116 was added to verify this and to make sure we handle more than one trailer header properly. Reported by: Patrick McManus Bug: http://curl.haxx.se/bug/view.cgi?id=3052450
2010-08-16progress: callback for POSTs less than MAX_INITIAL_POST_SIZEJulien Chaffraix
Add a call to Curl_pgrsSetUploadSize in this case valided by a test case. Reported by: Никита Дорохин. Bug: http://curl.haxx.se/mail/lib-2010-04/0173.html
2010-08-10indent: white space fixes onlyDaniel Stenberg
2010-07-24add_buffer_send: fix compiler warningDaniel Stenberg
Win64's 32 bit long but 64 bit size_t caused a warning that we avoid with a typecast. A small whitespace indent fix was also applied. Reported by: Adam Light
2010-07-06http: don't enable chunked during authentication negotiationsDaniel Stenberg
As mentioned in bug report #2956968, the HTTP code wouldn't send the first empty chunk during the auth negotiation phase of the HTTP request sending, so the server would wait for data to come and libcurl would wait for data to arrive... I've made the code not enable chunked encoding until the auth negotiation is done and thus this scenario doesn't occur anymore. Reported by: Sidney San Martn Bug: http://curl.haxx.se/bug/view.cgi?id=2956968
2010-05-07sendrecv: split the I/O handling into private handlerHoward Chu
Howard Chu brought the bulk work of this patch that properly moves out the sending and recving of data to the parts of the code that are properly responsible for the various ways of doing so. Daniel Stenberg assisted with polishing a few bits and fixed some minor flaws in the original patch. Another upside of this patch is that we now abuse CURLcodes less with the "magic" -1 return codes and instead use CURLE_AGAIN more consistently.
2010-05-05PolarSSL: initial support addedHoi-Ho Chan
This is Hoi-Ho Chan's patch with some minor fixes by me. There are some potential issues in this, but none worse than we can sort out on the list and over time.
2010-04-16Curl_setup_transfer: no longer returns anythingDaniel Stenberg
This function could only return CURLE_OK and by changing it to a void instead, we can simplify code all over.