hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HTTPCORE-148) Create AsyncNHttpServiceHandler & AsyncNHttpClientHandler
Date Wed, 20 Feb 2008 11:30:45 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570650#action_12570650
] 

Oleg Kalnichevski commented on HTTPCORE-148:
--------------------------------------------

Sam

I am done with my refactoring. All the things that found very annoying are gone now.

So, instead of this (which I find atrociously ugly)

---
ConsumingNHttpEntityTemplate incoming = (ConsumingNHttpEntityTemplate)((HttpEntityEnclosingRequest)
request).getEntity();
byte[] b = ((ByteContentListener)incoming.getContentListener()).getContent();
---

one can just do that, like with any ordinary blocking entity
---
HttpEntity entity = ((HttpEntityEnclosingRequest) request).getEntity();
byte[] b = EntityUtils.toByteArray(entity);
----

Please review and let me know what you think. The branch is now all yours.

Oleg

> Create AsyncNHttpServiceHandler & AsyncNHttpClientHandler
> ---------------------------------------------------------
>
>                 Key: HTTPCORE-148
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-148
>             Project: HttpComponents Core
>          Issue Type: New Feature
>          Components: HttpCore NIO
>    Affects Versions: 4.0-beta1
>            Reporter: Sam Berlin
>            Assignee: Oleg Kalnichevski
>             Fix For: 4.0-beta2
>
>         Attachments: changes.txt, changes2.txt
>
>
> Attached is a patch for AsyncNHttpServiceHandler.  It actually works (as tested by running
& hitting it with IE.)  :)
> To test, run the example 'AsyncNHttpFileServer' in the examples directory or the TestAsyncNHttpHandlers
test.

-- 
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: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message