Re: NameValuePair.equals

2003-09-08 Thread Laura Werner
Ortwin Glück wrote: Why is it required that equals returns false if the classes do not match exactly? I thinks this is a weird behaviour for an equals method and should clearly be changed. It's weird behavior, but you have to be careful when changing it to instanceof. If an equals method tries

Re: strange behavior of 2.0-rc1

2003-08-23 Thread Laura Werner
Leo Galambos wrote: I am using httpclient (HC) in a webcrawler. After 6 hours of run, HC stops working and I think, it is locked by some lock of a critical section in HC. The "problematic" code, I use, is here: http://www.egothor.org/temp/Network.java Are you running on Windows by any chance?

Re: sample code link does not work

2003-08-22 Thread Laura Werner
A few weeks ago I took a first stab at creating a Checkstyle 3.0 file for HttpClient, but I never got around to posting it. I don't think I covered all of the rules, but it's a start. I'll try attaching it to this email. -- Laura Ortwin Glück wrote: Cheers. Are you using Maven for this? I

Re: Grabbing a header from the server's response

2003-08-19 Thread Laura Werner
Mark Castillo wrote: After sending a GET request to a server, how to I pick out the name/value of a specific header from the server's response? Call the getResponseHeader(String name) method (or one of its siblings) on the HttpMethod you used for the request, which is probably a GetMethod in

Re: SocketException : SSL Implementation not available

2003-07-29 Thread Laura Werner
Roland Weber wrote: 3. your code does not work with IBM JDK 1.3 in WSAD with Sun JSSE FWIW, we were experimenting with the IBM JDK last year and got lots of mysterious JSSE failures. Finally we realized that we were still using Sun's JSSE implementation. Switching to the IBM JSSE for 1.3 fi

Re: [VOTE] HttpClient 2.0 RC1

2003-07-24 Thread Laura Werner
+1 (nonbinding) from me Kalnichevski, Oleg wrote: We have had just one (what I see as a real) bug since 2.0 beta2. I think it is time we moved past 'beta' into 'final release' phase with 2.0 branch - To unsubscribe, e-mail:

Re: [VOTE] Add commons-codec as an HttpClient dependency

2003-07-16 Thread Laura Werner
Kalnichevski, Oleg wrote: If it is just about release numbers, let us call it HttpClient 3.0 Amen. I'm not sure how much point there is in a 2.1 release if there's not allowed to be *any* API breakage. Maybe we should freeze the 2.0 stream and just put out 2.0.1, etc. bug fix releases and cal

Re: Encoding of special characters in request URI

2003-07-10 Thread Laura Werner
Oleg Kalnichevski wrote: This is one of many 'shady' areas of the HTTP spec. Basically there is no standard way for the client to communicate to the server what coding has been used to decode query parameters. It's definitely shady. I've seen two approaches used here. In the past, many internat

Re: [Proposal] exception handling revised

2003-07-04 Thread Laura Werner
Oleg Kalnichevski wrote: 2) Go elaborate - org.apache.commons.lang.exception.NestableException (or equivalent) | +-- org.apache.commons.httpclient.HttpException (Root exception) I prefer this "elaborate" approach. (And I liked your inclusion of an InterruptedHttpException.) I

Re: How to interrupt connexion ?

2003-07-03 Thread Laura Werner
I wrote (in response to Oleg): Good idea! We could implement this in HttpClient by having one "master" observer thread whose job was to close a connection's socket whenever a Method using that connection has timed out. I messed with this today and got it more or less working. Since I didn't w

Re: How to interrupt connexion ?

2003-07-03 Thread Laura Werner
Oleg Kalnichevski wrote: The observer thread simply closes the damn socket when the user hits the cancel button. Whuch. The communication thread immediately throws an IOException and happily terminates. Good idea! We could implement this in HttpClient by having one "master" observer thread w

Re: How to interrupt connexion ?

2003-07-03 Thread Laura Werner
Oleg Kalnichevski wrote: Sadly enough, there's (there will be) no reliable way to interrupt a request in the release 2.0. It is an unfortunate oversight on our part. This feature is planned for the 2.1 release: This is a hard problem, because almost all of the calls in the old java.io library

Re: GZip capabilities

2003-07-01 Thread Laura Werner
Adrian wrote: The input stream retrieved from the method would return the gzip encoded data and the GZipInputStream would read that, decompress it and return the actual data. A similar process would be applied to the output stream. We're interested in this too, because the http client in our V

Re: WSAD & HTTPClient question

2003-07-01 Thread Laura Werner
Hi Claudio, Does any one know any special consideration I have to know in order to make this work under WSAD 4.03? If WSAD uses an IBM version of the JDK, which I think it does, you probably need to get the corresponding IBM version of JSSE. We once ran into a problem trying to use the Sun JSSE j

Re: 0xfffd

2003-07-01 Thread Laura Werner
Hi Amit, 0xFFFD is the Unicode "replacement character". It's substituted into a character conversion output in cases where the destination character set has no character corresponding to a character in the input string. It's hard to know without seeing your code or a trace log, but I suspect

Re: Where to post

2003-06-26 Thread Laura Werner
Hi Nate, Jun 26, 2003 1:48:21 PM org.apache.commons.httpclient.HttpMethodBase processRedirectResponse INFO: Redirect requested but followRedirects is disabled ... I can just create a GetMethod and give it the url that would be redirected to, but how to get rid of that error message. Any suggestio

Re: [VOTE] Re: 2.0 release - deprecate some methods?

2003-06-26 Thread Laura Werner
Adrian Sutton wrote: The flaw in the toUsingCharset method is two-fold: Firstly, Strings in Java are *always* stored internally as UTF-8 I agree with the rest of your analysis of this, but I thought I should point out that Java Strings and "char"s are stored in UTF-16 rather than UTF-8. A "ch

Re: HTTP client caching

2003-06-25 Thread Laura Werner
Adrian Sutton wrote: I would actually think that a nice generic caching library would be very beneficial, but it should definitely be outside of HttpClient as HttpClient is very regularly used without any desire for caching at all. Agreed on both counts. I have a caching library that sits on to

Re: form urlencoding, was Re: URI query escapes

2003-06-21 Thread Laura Werner
Michael Becke wrote: I propose that we: - form urlencode values passed to HttpMethodBase.setQueryString(NameValuePair[]) - use java.net.URLEncoder for form urlencoding I agree, as long as URLEncoder seems to work. Do you think we need to modify URI so that it uses URLEncoder to encode the qu

Re: URI query escapes

2003-06-20 Thread Laura Werner
Michael Becke wrote: Yes, but this is for application/x-www-form-urlencoded values. Currently we only assume this content type for post params (this was recently fixed). I think we have to assume it for get params too. In the HTTP 4.01 spec, 17.13.3.4

Re: URI query escapes

2003-06-20 Thread Laura Werner
Hi Michael, I wish I'd done a bit more digging before my original post. It turns out the problem is that parameters were being encoded *twice*. We were encoding them once on our own, then the URI constructor was encoding them again. My "Mountain View" example was being encoded as "Mountain%

Re: Test Coverage

2003-06-20 Thread Laura Werner
Adrian Sutton wrote: Personally, I'm hoping to achieve 100% test coverage firstly because I've discovered how dependent I am on having good test cases while working on HttpClient (most people don't have the detailed level of knowledge that Mike and Oleg do and thus aren't aware that a change w

URI query escapes

2003-06-20 Thread Laura Werner
will do it for me. But I figured I'd ask here and see if anyone knew what had changed or had run into a problem like this before. Laura Werner BeVocal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Post Method

2003-06-10 Thread Laura Werner
Kalnichevski, Oleg wrote: must the body of a post request be encoded as a URL Query? Yes, it must, when the post body content is specified as a set of name/value pairs. I think you're also allowed to use the multipart/form-data MIME type rather than application/x-url-encoded (or whatever i

Re: Bug? HttpMethod.removeRequestHeader( "User-Agent" ) does notremove the header

2003-03-12 Thread Laura Werner
removed. I was wondering if we should modify HttpMethodBase so that it adds the default User-Agent header in the constructor and in recycle() instead. That way, removeRequestHeader would work. If folks think this is a good idea, I'll submit a patch. Laura Werner BeVocal --

Re: Proper Order of things...

2003-03-02 Thread Laura Werner
that method using the host config and client Close. You don't need to create a connection yourself. Just create a connection manager (probably a MultiThreadedHttpConnectionManager) and then use that to create an HttpClient. The connection manager will

Bug: News page has wrong date

2003-02-27 Thread Laura Werner
Hi all, I just noticed a minor gotcha while showing someone at work the News page at http://jakarta.apache.org/commons/httpclient/news.html. The first item has the wrong date: "25 January 2003" rather than "25 February 2003". -- Laura -

Re: DO NOT REPLY [Bug 17487] - waitForResponse is using busywait

2003-02-27 Thread Laura Werner
Oleg Kalnichevski wrote: Odi, are you sure you want to have an extra thread per HttpMethod? I do not think so You can do threads fairly efficiently by pooling them. I do it in my cache, since I have to allow a timeout on the whole transaction and abort the transaction even in the middle of read

Re: Significant HttpClient & HttpMethodBase overhaul. Need earlyfeedback

2003-02-26 Thread Laura Werner
Hi all, I really like this refactoring. People like Laura should track the changes we make and rewrite their own client to either use or extend the HttpClient class. For the long run I think nobody should go without the HttpClient class. HttpClient should act a bit like a facade. Agreed on all

Re: Significant HttpClient & HttpMethodBase overhaul. Need earlyfeedback

2003-02-25 Thread Laura Werner
Michael Becke wrote: I think it would be possible to add cross site redirects at the HttpClient level without removing the other functionality from the HttpMethod. HttpClient would just need to check the status code and re-try. But, just because it is possible doesn't mean we should do it.

Re: Significant HttpClient & HttpMethodBase overhaul. Need earlyfeedback

2003-02-25 Thread Laura Werner
Hi Oleg, Please remember those of us who aren't using the HttpClient class right now because it isn't quite flexible enough. If all of the redirect and authentication logic is moved there, I'd also like to see more flexibility, so that we don't have to write our own client classes that duplic

Re: The use of UTIUtil.toUsingCharset?

2003-02-20 Thread Laura Werner
Eric E Johnson wrote: So you can imagine that the first step would be precisely what these routines do - a conversion of a String into byte encoding XXX, and then back into a String in encoding YYY, where YYY almost certainly is ASCII. Having done that, you can use all your functions that URL

Re: The use of UTIUtil.toUsingCharset?

2003-02-20 Thread Laura Werner
Oleg, I can't say I comletely agree with your point (or understand it), but so be it. Feel free to ask for clarification. Basically I was trying (in my wordy way) to say that toUsingCharset seems to do two things: - Convert the Unicode string to an array of bytes using the converter for "

Re: The use of UTIUtil.toUsingCharset?

2003-02-20 Thread Laura Werner
Oleg Kalnichevski wrote: I apologize for restarting this conversation, but I have to confess I found myself not intelligent enough to be able to grasp grand designs of the UTIUtil#toUsingCharset method Not a problem. And it's not intelligence; a) URI and URIUtil are not well documented, and

Re: Proxy-Connection: close header

2003-02-19 Thread Laura Werner
Adrian Sutton wrote: Do you have any idea how to make squid use that header? I don't think we're doing anything special to make it happen. Here are the headers from a couple of typical transaction, with a few host names slightly obscured. This is using my own Java-based caching code on top

Re: Proxy-Connection: close header

2003-02-19 Thread Laura Werner
Squid sometimes uses a Proxy-Connection header as well. So whatever patch you come up with will probably be useful for more than just IIS. Laura Werner BeVocal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: The use of UTIUtil.toUsingCharset?

2003-02-04 Thread Laura Werner
Hi Sung-Gu, Actually, that's very easy... And not that important unless it's not going to be support multilinqual. As you see the diagram, bytes informations created from the original charset should be restored. That's all. My understanding of what you're saying is that if someone constructs

Re: using httpclient without a HttpClient object (was Redirects?)

2003-02-03 Thread Laura Werner
-site redirects without returning to the caller. I think it would be OK to add the redirect functionality to HttpClient, but I think it should go into a public static method, so that it can be called by the normal HttpClient methods and by people like me. I can do the work on this if you want. Laura

Minor bug in checkstyle.properties

2003-01-31 Thread Laura Werner
is correct. (I suspect it's the second one, though). Laura Werner BeVocal Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]