Re: http requests

2019-12-01 Thread Ray Satiro via curl-library
On 12/2/2019 2:21 AM, Daniel Stenberg wrote: On Mon, 2 Dec 2019, Ray Satiro via curl-library wrote: If you are using Visual Studio you will probably have to build it yourself from source [1] since I don't think we have pre-built libs for Visual Studio. How about the vcpkg approach mentioned

Re: http requests

2019-12-01 Thread Daniel Stenberg via curl-library
On Mon, 2 Dec 2019, Ray Satiro via curl-library wrote: If you are using Visual Studio you will probably have to build it yourself from source [1] since I don't think we have pre-built libs for Visual Studio. How about the vcpkg approach mentioned at the top of

Re: http requests

2019-12-01 Thread Ray Satiro via curl-library
On 11/29/2019 10:25 AM, Gustav Wiberg via curl-library wrote: Im trying to get libcurl working with Visual Studio 2017 with C++ on Windows 10. I have tried different things and maybe I have messed VS 2017 ;-) I have never used C++ before so u understand my knowledge about this...  I want

http requests

2019-11-29 Thread Gustav Wiberg via curl-library
Hi Im trying to get libcurl working with Visual Studio 2017 with C++ on Windows 10. I have tried different things and maybe I have messed VS 2017 ;-) I have never used C++ before so u understand my knowledge about this... I want to do a very simple http request and I can't figure out to get

Extending pipelining to non-GET HTTP requests

2014-08-08 Thread m brandenberg
This is a preliminary diff against 7.37.1 just to open discussion. The point of this change is to give control to the library user as to which HTTP methods may participate in pipelining rather than assuming that GET is always and only compatible. With this multi option enabled, any request

multiple HTTP requests/responses when using proxy authentication

2013-08-09 Thread Václav Zeman
Hi. I am in a situation where I am using proxy authentication but I need only the last response. I suspect this is true for most people who do HTTP over proxy. Now, it is fairly hard to distinguish the response boundaries because of the possibility of chunked encoding of the response and the

Re: multiple HTTP requests/responses when using proxy authentication

2013-08-09 Thread Daniel Stenberg
On Fri, 9 Aug 2013, Václav Zeman wrote: I am in a situation where I am using proxy authentication but I need only the last response. I suspect this is true for most people who do HTTP over proxy. Now, it is fairly hard to distinguish the response boundaries because of the possibility of

Re: multiple HTTP requests/responses when using proxy authentication

2013-08-09 Thread Václav Zeman
On 9 August 2013 17:11, Daniel Stenberg wrote: On Fri, 9 Aug 2013, Václav Zeman wrote: I am in a situation where I am using proxy authentication but I need only the last response. I suspect this is true for most people who do HTTP over proxy. Now, it is fairly hard to distinguish the response

Re: multiple HTTP requests/responses when using proxy authentication

2013-08-09 Thread Daniel Stenberg
On Fri, 9 Aug 2013, Václav Zeman wrote: We are using libcurl as a transport backend for gSOAP because libcurl has better proxy authentication capabilities. When I send a HTTP request through proxy with authentication, my CURLOPT_WRITEFUNCTION callback is receiving all headers, even headers

AW: HTTP requests often take longer (150 milliseconds) in latest cURL

2013-07-19 Thread Andreas Malzahn
[mailto:curl-library-boun...@cool.haxx.se] Im Auftrag von Daniel Stenberg Gesendet: Sonntag, 14. Juli 2013 17:07 An: libcurl development Betreff: Re: HTTP requests often take longer (150 milliseconds) in latest cURL On Fri, 12 Jul 2013, Andreas Malzahn wrote: When upgrading our application from cURL

Re: AW: HTTP requests often take longer (150 milliseconds) in latest cURL

2013-07-19 Thread Daniel Stenberg
On Fri, 19 Jul 2013, Andreas Malzahn wrote: The increasing sleep time looks perfect, works fine in the application - all requests work with without_fds = 4 so have minimal delay. Thanks for testing, I've now pushed this to the git repo. I still have no idea why curl_multi_wait() returns then

Re: HTTP requests often take longer (150 milliseconds) in latest cURL

2013-07-18 Thread Daniel Stenberg
On Sun, 14 Jul 2013, Daniel Stenberg wrote: How about starting off with that and then gradually increasing the sleep time to avoid looping very many times? Something like this: Nothing at all to say about it? -- / daniel.haxx.se

Re: HTTP requests often take longer (150 milliseconds) in latest cURL

2013-07-14 Thread Daniel Stenberg
On Fri, 12 Jul 2013, Andreas Malzahn wrote: When upgrading our application from cURL version 1.25 to 1.31, many HTTP requests take now longer - time increased from 40- 60ms to 151ms. First, I assume you're talking about 7.25.x to 7.31.0. Then, what resolver backend are you using now and did

HTTP requests often take longer (150 milliseconds) in latest cURL

2013-07-12 Thread Andreas Malzahn
Hi, When upgrading our application from cURL version 1.25 to 1.31, many HTTP requests take now longer - time increased from 40- 60ms to 151ms. Our application does many HTTP requests per second to localhost using curl easy interface. (TMS server) I traced the problem back

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-19 Thread Chrysovaladis Datsios
That was in reference to the check if the given headers were too large to fit into the fixed-size buffer. If a malloc() fails, clearly the system is out of memory. Of course you're right :) --- List admin:

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-19 Thread Chrysovaladis Datsios
Here's the updated patch. 0004-CURLOPT_TRAILERFUNCTION-support-chunked-encoding-req-7.29.0.patch Description: Binary data /*** * _ _ _ * Project ___| | | | _

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-15 Thread Chrysovaladis Datsios
Hi, I attach a patch with some changes and a test case. In the patch: -- I copy my 'trailer_headers_buf' into the original buffer and I free mine at the end. (no leaks from 'trailer_headers_buf' anymore) -- I added a bool variable 'done' so as to update 'data-req.upload_done' at its

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-15 Thread Gisle Vanem
Chrysovaladis Datsios cdats...@gmail.com wrote: In the patch: ... (line 155 in patch): + trailer_headers_buf = malloc(headers_buf_size); + if(trailer_headers_buf == NULL) +return CURLE_BAD_FUNCTION_ARGUMENT; W/o looking at your code in details, why isn't this

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-15 Thread Chrysovaladis Datsios
W/o looking at your code in details, why isn't this returning 'CURLE_OUT_OF_MEMORY'? --gv According to Dan Fandrich: --- And I'm not sure CURLE_OUT_OF_MEMORY is the best error code here--the system is technically not out of memory. Maybe

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-15 Thread Dan Fandrich
On Fri, Mar 15, 2013 at 02:07:47PM +0200, Chrysovaladis Datsios wrote: W/o looking at your code in details, why isn't this returning 'CURLE_OUT_OF_MEMORY'? --gv According to Dan Fandrich: --- And I'm not sure CURLE_OUT_OF_MEMORY is the best error

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-13 Thread Daniel Stenberg
On Mon, 11 Mar 2013, Chrysovaladis Datsios wrote: changes are in the attached patch. Thanks. I would say that this is close to getting merged. My main issue is remark #4 which kind of made #5 slip in... 1 - invalid email in the Author: field 2 - incomplete commit message 3 -

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-13 Thread Dan Fandrich
On Mon, Mar 11, 2013 at 06:09:29PM +0200, Chrysovaladis Datsios wrote: --- a/lib/transfer.c +++ b/lib/transfer.c @@ -193,6 +193,71 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) /* copy the prefix to the buffer, leaving out the NUL */

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-03-11 Thread Chrysovaladis Datsios
Hi, changes are in the attached patch. Where does the magic number 3 come from? I've changed it to 2. One endofline_native for each trailer header and another at the end. I'm not sure CURLE_OUT_OF_MEMORY is the best error code here--the system is technically not out of memory. Maybe

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-02-28 Thread Chrysovaladis Datsios
Hi, I'm sending a patch of my git commited changes (tryed to keep the indent style, apologize if missed something) 3 - I would appreciate a way that starts off with a much smaller buffer but that can grow if needed. Now I start with a buffer of 256 and it grows up to 100K. Added checks

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-02-28 Thread Dan Fandrich
This is looking much cleaner than before! I've spotted a few issues left, though. On Thu, Feb 28, 2013 at 12:00:51PM +0200, Chrysovaladis Datsios wrote: @@ -193,8 +194,66 @@ CURLcode Curl_fillreadbuffer(struct connectdata *conn, int bytes, int *nreadp) /* copy the prefix to the buffer,

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-02-22 Thread Daniel Stenberg
On Thu, 21 Feb 2013, Chrysovaladis Datsios wrote: I read no prohibition in putting read function inside main. It's just a personal decision. I believe if the patch gets accepted a more formal code example will be written. It isn't C89 compliant code so it couldn't be used by us as-is, and we

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-02-22 Thread Chrysovaladis Datsios
Daniel hi, it wasn't my intention to make your life hard. I too enjoy working with(and for) libcurl and I want to write something useful for it. You'll hear soon from me! 2013/2/22 Daniel Stenberg dan...@haxx.se: On Thu, 21 Feb 2013, Chrysovaladis Datsios wrote: I read no prohibition in

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-02-21 Thread Chrysovaladis Datsios
Hi, I'm sending you a new version of the patch. It is attached. 0 - you didn't really follow our code style when it comes to indenting. A minor nit, but still... I tried to keep it, but the mail formater wash it off :) 1 - Can you think of a good reason why the callback would need to

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-02-21 Thread Guenter
Hi, Am 21.02.2013 09:23, schrieb Chrysovaladis Datsios: Following are a small documentation an example code using it. did you test your sample? Even if it will compile and run (which I doubt) its wrong ... int main(void) { ... /* Read callback function */ size_t read_callback(void

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-02-21 Thread Chrysovaladis Datsios
did you test your sample? Don't just copy paste code (mail formatting might have changed the code) Gün. I read no prohibition in putting read function inside main. It's just a personal decision. I believe if the patch gets accepted a more formal code example will be written.

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-02-17 Thread Daniel Stenberg
Hiya, Thanks for the patch. Now we're getting somewhere. This version is much better than previous versions! I do have a few questions and tips: 0 - you didn't really follow our code style when it comes to indenting. A minor nit, but still... 1 - Can you think of a good reason why

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-02-14 Thread Chrysovaladis Datsios
Hi, I made some changes base on your suggestions: I would prefer if we cut out the 'HTTP' from the name, and try to keep it otherwise protocol agnostic. If we pretend this isn't HTTP specific, there's no reason we can't use this callback for other protocols in another similar scenario if

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-28 Thread Chrysovaladis Datsios
I don't see how this has changed. It will trigger in some cases when the payload happens to match 0\r\n. Now only when a trailerheader_callback has been set will enable any further check for the last chunk and the addition of the trailer headers as a payload. Also, only the

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-28 Thread Daniel Stenberg
On Mon, 28 Jan 2013, Chrysovaladis Datsios wrote: Thanks for efforts and contribution! +--+ | documentation | +--+ curl_easy_setopt() option: CURLOPT_HTTPTRAILERFUNCTION I would prefer if we cut out the 'HTTP' from the name,

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-24 Thread Chrysovaladis Datsios
I welcome this improvement but I agree with Dan Fandrich that it would be more useful if implemented as a callback. My use cases for request trailers involve signing operations on the message body where it's expensive to buffer the whole request before starting to send the body… especially as

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-19 Thread Tim Bannister
On 17 Jan 2013, at 12:35, Chrysovaladis Datsios wrote: Hi, this is a patch for the feature request as described in http://sourceforge.net/p/curl/feature-requests/67/ the feature is a standard in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.40 I welcome this improvement but I

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-19 Thread Daniel Stenberg
On Sat, 19 Jan 2013, Tim Bannister wrote: I welcome this improvement but I agree with Dan Fandrich that it would be more useful if implemented as a callback. My use cases for request trailers involve signing operations on the message body where it's expensive to buffer the whole request

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-18 Thread Chrysovaladis Datsios
Thank you both for your immediate response and comments. Every comment was a great suggestion towards the correct implementation of the feature. Please do review the following sections as formed after your previous comments. +--+ | documentation |

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-18 Thread Linus Nielsen Feltzing
On 01/18/2013 02:51 PM, Chrysovaladis Datsios wrote: The option is set before the curl_easy_perfom(1). The linked list of HTTP trailer headers contains some initial values of those headers. The initial values are not the values that will be sent finally at the end of the transfer. The

[PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-17 Thread Chrysovaladis Datsios
Hi, this is a patch for the feature request as described in http://sourceforge.net/p/curl/feature-requests/67/ the feature is a standard in http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.40 One can also refer at Chris Shiflett's Book HTTP: Developer's Handbook from SAMS page 97.

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-17 Thread Dan Fandrich
On Thu, Jan 17, 2013 at 02:35:12PM +0200, Chrysovaladis Datsios wrote: The feature is implemented as another in curl_easy_setopt() function. This new option is named CURLOPT_HTTPTRAILERHEADER and adds the trailer headers appended on a curl_slist. Example code snippet using the new feature:

Re: [PATCH] Addition of trailer headers in HTTP requests generated by libcurl

2013-01-17 Thread Daniel Stenberg
On Thu, 17 Jan 2013, Dan Fandrich wrote: +char tfield[CURL_MAX_HTTP_HEADER]; +strncpy(tfield, trailer_headers-data, tptr-trailer_headers-data+1); This will overflow tfield given a long enough user-supplied header. In addition to Dan's fine comments, allow me to point out

Re: Can cURL send multiple HTTP Requests?

2012-11-16 Thread Daniel Stenberg
On Thu, 15 Nov 2012, Fuller, Rudyard wrote: We are setting up a test regression harness that involved reading XML input requests from a database and firing each request record into a WSDL. Can cURL read through database records, send each XML request to a WSDL, receive the output XML

Can cURL send multiple HTTP Requests?

2012-11-15 Thread Fuller, Rudyard
Hello, We are setting up a test regression harness that involved reading XML input requests from a database and firing each request record into a WSDL. Can cURL read through database records, send each XML request to a WSDL, receive the output XML response, store back into a database table?

Re: Using callbacks to send data in GET and custom HTTP requests

2010-04-14 Thread Daniel Stenberg
On Wed, 14 Apr 2010, Marco Toldo wrote: I need to execute some GET requests containing a generated-on-the-fly body. By looking at libcurl documentation I tried to do this with a simple callback (basically the same used in post-callback.c example) but resulting trace in Wireshark shows no data

Re: [PATCH] transfer.c fixes for CURL_DO_LINEEND_CONV and non-ASCII platform HTTP requests

2009-05-04 Thread Yang Tse
2009/5/1, David McCreedy wrote: That causes two problems: Committed, Thanks -- -=[Yang]=-