RE: Re: Change domains after faking a POST?

2004-01-22 Thread Tim Reilly
Its off topic for HttpClient (if I understand you need a transcoding proxy),
but here are some resources that may help. You may want to have a look at
some Jetspeed classes and related. Specifically the jetspeed.util.rewriter
package, websurf portlet, and the webclipping portlet.

http://jakarta.apache.org/jetspeed/api/org/apache/jetspeed/util/rewriter/pac
kage-summary.html
http://jakarta.apache.org/jetspeed/site/community-portlets.html
http://jakarta.apache.org/jetspeed/site/portlet_config_WebClippingPortlet.ht
ml

Cocoon may also have some similar code as I recall.

HTH


> -Original Message-
> From: D Alvarado [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 21, 2004 12:32 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Re: Change domains after faking a POST?
>
>
>
> > If you try and think this through carefully,
> you will see that the term
> "in the context of" will inadvertly lead to
> ambiguities. What about
> images referenced by the document, how must they
> be resolved? What about
> links to other domains, do we still have to use
> the "proxy" or can we
> just reach them directly?
>
> > Please for the sake of the architecture of your
> application, do not
> blindly relay content to the client.  The Http
> Proxy standard was
> specifically made for that purpose. So do not
> believe you can do better
> - you will fail terribly.
>
> Ok, well I definitely won't pursue the blind
> route.  How would an HTTP Proxy behave in this
> situation?  Surely it wouldn't parse out HTML.
> Also, not that this matters, but there will never
> be images or links, just the relative url in the
> action form tag.
>
> I have also considered the case that this
> situation has no elegant answer.  If so, I will
> let this die. -
>
>
> Care2 make the world greener!
> Eighty-six nations have signed the international Framework
> Convention on Tobacco Control. Help get the U.S. on the list!
> http://www.care2.com/go/z/10840/1060
>
> -
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: refresh header proxy

2004-01-12 Thread Tim Reilly
Not to beat a dead horse... but I was surprised this is a non-standard
header so for anyone interested here are my "of interest" links. As Odi
mentions Netscape introduced the header (the meta tag is the html equivalent
to the (non-standard) http header.)

Early draft refers to the Refresh header but marks it "TBS"
http://www.w3.org/Protocols/HTTP/1.1/spec.html#Refresh
Later an issue from the working group says the follow: was not in the 1.1
spec, "due to unexplored security implications"

Post from a 2000 w3c list. Good information for anyone implementing the
behavior expected and wanting to know why 3xx doesn't cover what's done in
the Refresh:
http://lists.w3.org/Archives/Public/w3c-wai-ua/2000JanMar/0412.html

The Netscape "vision" for the header.
http://wp.netscape.com/assist/net_sites/pushpull.html

JavaBoutique article showing usage.
http://javaboutique.internet.com/tutorials/JSP/part08/page02.html
mentions non-standard header, but that NS and IE support it.


>
>
[trunc]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: getMethod.getResponseBody() leaks handles

2003-08-23 Thread Tim Reilly
FYI -

Thanks much for this information.
We had a what seemed like a bug using Linux/WPS/IBM-JDK to Windows/IIS using
NTLM Auth... the code ran once or twice then started getting 401 responses.
I believe the socket closed / or connection closed (then the NTLM
negotiation was not performed again.)

Using a single HttpClient instead of new one for each method invokation plus
using getResponseBodyAsString instead of getResonseBodyAsStream resolved it
for us.

IMHO adding Roland's 1..4 below to the site/tutorial would be a good thing.

Thanks
-TR

> -Original Message-
> From: Roland Weber [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 12, 2003 4:13 AM
> To: Commons HttpClient Project
> Subject: RE: getMethod.getResponseBody() leaks handles
>
>
> David, Michael,
>
> I get the feeling you have entered a closed loop in your discussion.
> Please let me add an observer's view, in hope to break the loop.
> I'll adress this mail to David, since it's whom we are trying to help
> with his problem.
> I want to point out that I did not dive into the source code for this
> mail, neither into that of the HTTP client nor that of David's test
> program. I gathered my "evidence" just from the natural language
> parts of the correspondence, and from my user-level knowledge
> of the HTTP client. So, David:
>
> HttpMethod is not meant to close connections. It is meant to use
> them, and then give them back to the connection manager, which
> will decide whether to close or reuse them. There are some cases
> in which the HttpMethod knows that the connection cannot be
> reused and closes them, but that's not the regular case.
>
> From one of Michaels remarks I learned that you are creating a
> new instance of the HTTP client and connection manager for
> each request. Which means you are not using the HTTP client
> in the way it is meant to be used. This may or may not indicate
> a deficiency in the documentation. It probably does, see below.
>
> Actually, the connections do not leak when you execute your
> HTTP method, or finish executing it. They leak when you forget
> about the current connection manager rather than reusing it for
> the next request. The difference in behavior between Linux and
> Windows is due to the fact that the Linux JVM has a fall-back
> cleanup mechanism which closes the connection, while the
> Windows JVM has not. If you restructure your application, no
> fall-back cleanup will come into this and behaviour will be similar
> on both platforms.
>
> I guess the sample code on how to use the HTTP client for a
> single request does not point out which part of the code is a
> one-time initialization and which part needs to be repeated for
> each request. So let me tell you:
> 1. The HTTP Client instance and it's connection manager
>should be created once, during initialization of the application.
>Both are meant to be reused for all subsequent requests.
> 2. Connections will be opened, closed or reused implicitly
>by the connection manager (see 4).
> 3. The HttpMethod objects can be created for each request,
>or recycled if you want to.
> 4. HttpMethod.releaseConnection() must be invoked after
>each request. It will make sure that the connection used
>for that request is given back to the connection manager.
>
> I hope this helps,
>   Roland
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]