[
https://issues.apache.org/jira/browse/HTTPCORE-137?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12556736#action_12556736
]
Ronald E Johnson commented on HTTPCORE-137:
-------------------------------------------
When running the test code using Winie (http://jigsaw.w3.org/Winie), I get the
following output:
connection from 10.0.0.2
Request: [EMAIL PROTECTED]
Request Line: HEAD /test.txt HTTP/1.1
Method: HEAD
Processing PUT request...
Printing HTTP headers:
Header: Date, Value: Mon, 07 Jan 2008 22:04:07 GMT
Header: Accept, Value: */*
Header: Host, Value: 10.0.0.2
Header: User-Agent, Value: Winie/1.0.10
Request Target: /test.txt
File Transfer: Mon Jan 07 17:04:07 EST 2008 IP: 10.0.0.2 Path: C:\temp\test.txt
Connection timed out: [closed]
connection closed from 10.0.0.2
The cast to an HttpEntityEnclosingRequest never happens. The request line from
Winie is seen as a HEAD request. I've tried other PUT clients, but they give
the same results.
> Problem handling HTTP PUT requests
> -----------------------------------
>
> Key: HTTPCORE-137
> URL: https://issues.apache.org/jira/browse/HTTPCORE-137
> Project: HttpComponents Core
> Issue Type: Bug
> Components: HttpCore NIO
> Affects Versions: 4.0-rc1
> Environment: Java JDK 1.6.0_03 on Windows XP Service Pack 2
> Reporter: Ronald E Johnson
> Attachments: TestHTTPServer.java
>
>
> I have a Java Swing application with an HttpServer() instance running in a
> SwingWorker thread. I'm able to get at the HTTP GET requests by casting the
> request as follows:
> if (request instanceof HttpEntityEnclosingRequest) {
> HttpEntity entity = ((HttpEntityEnclosingRequest)
> request).getEntity();
> byte[] entityContent = EntityUtils.toByteArray(entity);
> logger.info("Incoming entity content (bytes): " +
> entityContent.length);
> }
> However this does not work for PUT requests. In fact printing out the request
> line of a PUT request appears as: "HEAD /test.txt HTTP/1.1", and I don't see
> PUT in the request line at all. Attempting to cast this as an
> HttpEntityEnclosingRequest fails, and thus I'm not able to get at the
> HttpEntity. Is this functionality supported?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]