in Education by
I am trying to POST a HTML (contained in a file) to a URL using Wget like this: wget -O- --debug --header=Content-Type:text/html --post-file=index.html http://localhost/www/encoder.ashx The URL to which the HTML is being posted is a Web application end-point implemented using ASP.NET. The server replies with a 100 (Continue) response and Wget simply stops dead in its tracks rather than continuing with the real response that should follow next. Can Wget be somehow told to hanlde a 100 (Continue) response or is this some well-known limitation of the tool? Notes: I noticed that Wget never sends the Expect: 100-Continue header so technically the server should not be issuing a 100 (Continue) response. UPDATE: Looks like this is possible, as per §8.2.3 of RFC 2616 (Hypertext Transfer Protocol -- HTTP/1.1): An origin server SHOULD NOT send a 100 (Continue) response if the request message does not include an Expect request-header field with the "100-continue" expectation, and MUST NOT send a 100 (Continue) response if such a request comes from an HTTP/1.0 (or earlier) client. There is an exception to this rule: for compatibility with RFC 2068, a server MAY send a 100 (Continue) status in response to an HTTP/1.1 PUT or POST request that does not include an Expect request-header field with the "100- continue" expectation. This exception, the purpose of which is to minimize any client processing delays associated with an undeclared wait for 100 (Continue) status, applies only to HTTP/1.1 requests, and not to requests with any other HTTP- version value. cURL has no problems with such a transaction. It send an Expect: 100-Continue header and continued with 100 (Continue) response on to the real one. For more information, here is the full debug trace of the transaction from the invocation shown above: Setting --post-file (postfile) to index.html Setting --header (header) to Content-Type:text/html DEBUG output created by Wget 1.10 on Windows. --13:29:17-- http://localhost/www/encoder.ashx => `-' Resolving localhost... seconds 0.00, 127.0.0.1 Caching localhost => 127.0.0.1 Connecting to localhost|127.0.0.1|:80... seconds 0.00, connected. Created socket 296. Releasing 0x01621a10 (new refcount 1). ---request begin--- POST /www/encoder.ashx HTTP/1.0 User-Agent: Wget/1.10 Accept: */* Host: localhost Connection: Keep-Alive Content-Type: text/html Content-Length: 30984 ---request end--- [writing POST file index.html ... done] HTTP request sent, awaiting response... ---response begin--- HTTP/1.1 100 Continue Server: ASP.NET Development Server/9.0.0.0 Date: Wed, 24 Sep 2008 11:29:17 GMT Content-Length: 0 ---response end--- 100 Continue Closed fd 296 13:29:17 ERROR 100: Continue. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
I looked at the source code to wget for Windows, and as far as I can tell the debug output is coming from the generic error condition when wget fails to parse the response properly. Looks like this is just a limitation of wget, so you'll probably have to use curl or some other method to avoid encountering this issue.

Related questions

0 votes
    I got this question regarding web server (such as nginx, Cherokee or Oracle iPlanet) and Java containers ( ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Aug 1, 2022 in Education by JackTerrance
0 votes
    I have written tests with Selenium2/WebDriver and want to test if HTTP Request returns an HTTP 403 Forbidden. ... Selenium WebDriver? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    Which layer is used to handle the HTTP requests? (a) Network Layer (b) Transport Layer (c) ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    I am trying develop first app in ionic and with codeigniter backend but facing Response for preflight has ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 5, 2022 in Education by JackTerrance
0 votes
    When dealing with mobile clients it is very common to have multisecond delays during the transmission of HTTP ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 17, 2022 in Education by JackTerrance
0 votes
    I have the following code (just as a test) and I want to create an HTTP proxy using EventMachine. The code below ... , data, b].inspect end conn.on_data do |data| @buffer...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    Which of the following is a feature of the HTTP response? (a) Mandatory response body (b) Optional ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 23, 2021 in Education by JackTerrance
0 votes
    Which among the below directives belonging to the Cache-Control header of HTTP response provide information to the server that the ... -revalidate 3. no-cache 4. None of the above...
asked Jun 24, 2021 in Technology by JackTerrance
0 votes
    Which directive of Cache Control Header of HTTP response provides indication to server to revalidate resource if max-age has passed?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which directive of Cache Control Header of HTTP response can set the time limit of caching?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which directive of Cache Control Header of HTTP response indicates that resource is not cachable?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which directive of Cache Control Header of HTTP response indicates that resource is cachable by only client and server, no intermediary can cache the resource?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which directive of Cache Control Header of HTTP response indicates that resource is cachable by any component?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which header of HTTP response sets expiration date and time of caching?...
asked Nov 7, 2020 in Technology by JackTerrance
0 votes
    Which header of HTTP response provides control over caching?...
asked Nov 7, 2020 in Technology by JackTerrance
...