Re: Cookie rejected - Log noise

2015-06-17 Thread Johan Hertz

Hi Francois,

It is receiving the cookies I think? I am not actively send any cookies 
but the HttpClient might be doing it for me (in the background).


How do I set the log configuration for ResponseProcessCookies?

Regards
Johan

On 2015-06-17 11:59, Francois-Xavier Bonnet wrote:

Hi Johan,

This warning is logged by class 
org.apache.http.client.protocol.ResponseProcessCookies. You just have 
to set this category to ERROR level in the log configuration and you 
will not get anymore warnings about invalid cookies.
But in the first place is it normal that your application is sending 
invalid cookies?



2015-06-17 11:30 GMT+02:00 Johan Hertz jhz.mailgro...@gmail.com 
mailto:jhz.mailgro...@gmail.com:


Hi,

I get a lot of log noise in the form of cookie rejected messages
(see below), can I disable this from being written to the log?

Cookie rejected: [version: 0][name: SessionStatId][value:
**][domain: .priv.atos.fr http://priv.atos.fr][path: /][expiry:
Thu Jun 15 11:23:17 CEST 2023]. Illegal domain attribute
someotheraddress.fr http://someotheraddress.fr. Domain of
origin: someaddress.com http://someaddress.com

Regards
Johan


-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
mailto:httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail:
httpclient-users-h...@hc.apache.org
mailto:httpclient-users-h...@hc.apache.org






Cookie rejected - Log noise

2015-06-17 Thread Johan Hertz

Hi,

I get a lot of log noise in the form of cookie rejected messages (see 
below), can I disable this from being written to the log?


Cookie rejected: [version: 0][name: SessionStatId][value: **][domain: 
.priv.atos.fr][path: /][expiry: Thu Jun 15 11:23:17 CEST 2023]. Illegal 
domain attribute someotheraddress.fr. Domain of origin: someaddress.com


Regards
Johan


-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



Re: Cookie rejected - Log noise

2015-06-17 Thread Johan Hertz

Thanks a lot, I will have a look at the link provided.

Regards
Johan

On 2015-06-17 14:39, Francois-Xavier Bonnet wrote:
Yes, it is about cookies that you receive from the server you are 
calling using HttpClient. HttpClient is trying to handle the cookies 
sent by the server you are calling just like a regular browser would do.


Logging configuration is described extensively here:
https://hc.apache.org/httpcomponents-client-ga/logging.html
It depends which logging library you are using on your project 
(commons-logging, log4j...).


2015-06-17 14:17 GMT+02:00 jhz.mailgro...@gmail.com 
mailto:jhz.mailgro...@gmail.com:


Hi Francois,

It is receiving the cookies I think? I am not actively send any
cookies but the HttpClient might be doing it for me (in the
background).

How do I set the log configuration for ResponseProcessCookies?

Regards
Johan


On 2015-06-17 11:59, Francois-Xavier Bonnet wrote:

Hi Johan,

This warning is logged by class
org.apache.http.client.protocol.ResponseProcessCookies. You just
have to set this category to ERROR level in the log configuration
and you will not get anymore warnings about invalid cookies.
But in the first place is it normal that your application is
sending invalid cookies?


2015-06-17 11:30 GMT+02:00 Johan Hertz jhz.mailgro...@gmail.com
mailto:jhz.mailgro...@gmail.com:

Hi,

I get a lot of log noise in the form of cookie rejected
messages (see below), can I disable this from being written
to the log?

Cookie rejected: [version: 0][name: SessionStatId][value:
**][domain: .priv.atos.fr http://priv.atos.fr][path:
/][expiry: Thu Jun 15 11:23:17 CEST 2023]. Illegal domain
attribute someotheraddress.fr http://someotheraddress.fr.
Domain of origin: someaddress.com http://someaddress.com

Regards
Johan


-
To unsubscribe, e-mail:
httpclient-users-unsubscr...@hc.apache.org
mailto:httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail:
httpclient-users-h...@hc.apache.org
mailto:httpclient-users-h...@hc.apache.org









Re: How to get the parameters from HttpRequest?

2014-12-19 Thread Johan Hertz

On 2014-12-19 14:47, Oleg Kalnichevski wrote:

On Thu, 2014-12-18 at 17:59 +0100, Johan Hertz wrote:

Hi,

I am creating a class that implements the interface HttpRequestHandler.
The handle method has a parameter of type HttpRequest on which I would
expect to find the payload/parameters sent to the server. It does have a
getParams method but it is deprecated. The deprecated message is /use
configuration classes provided 'org.apache.http.config' and
'org.apache.http.client.config///.

Looking at this classes I can't seem to find what I am after, anyone
know where I should look?

Regards
Johan


Johan

URIBuilder [1] and URLEncodedUtils [2] from HttpClient should do the
trick. You can use URIBuilder to manipulate request URIs and extract
request query parameters. URLEncodedUtils can be used to parse request
entity to extract form parameters.

Hope this helps.

Oleg

[1]
http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/org/apache/http/client/utils/URIBuilder.html
[2]
http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/org/apache/http/client/utils/URLEncodedUtils.html


-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org


Hi,

Thanks for replying.

I am doing this on the server side so I don't know if the solution you 
suggested applies? But what I found was that the request was of type 
HttpEntityEnclosingRequest. So I just cast to that and then get the 
payload data using entityRequest.getEntity() and then read the data from 
the input stream returned by entity.getContent().


Regards
Johan


-
To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org
For additional commands, e-mail: httpclient-users-h...@hc.apache.org



How to get the parameters from HttpRequest?

2014-12-18 Thread Johan Hertz

Hi,

I am creating a class that implements the interface HttpRequestHandler.  
The handle method has a parameter of type HttpRequest on which I would 
expect to find the payload/parameters sent to the server. It does have a 
getParams method but it is deprecated. The deprecated message is /use 
configuration classes provided 'org.apache.http.config' and 
'org.apache.http.client.config///.


Looking at this classes I can't seem to find what I am after, anyone 
know where I should look?


Regards
Johan