Being able to modify HTTP headers for a request

View: New views
3 Messages — Rating Filter:   Alert me  

Being able to modify HTTP headers for a request

by Jason van Zyl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Joakime,

Do you think you could add something that would allow us to add to  
set of headers that are sent to a client, and set the client string?  
In Maven I would like to accurately keep track of what versions of  
Maven are actively in use and I think being able to send version  
information along with the request and/or version numbers in the  
client string would help us tremendously in knowing who is actually  
using what.

Jason.

---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-dev-unsubscribe@...
For additional commands, e-mail: wagon-dev-help@...


Re: Being able to modify HTTP headers for a request

by Joakim Erdfelt-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I would like to have this optionally work across all current (and
future) wagon wheels (providers).

How about the following methods?
for reference ->
http://maven.apache.org/wagon/wagon-provider-api/apidocs/org/apache/maven/wagon/Wagon.html

Wagon.setClientProperties( Properties );
Wagon.setClientProperty( String key, String value );

That way, you can provide the data, pass it anonymously to the active
wagon, and (if the wagon supports it), add those key/value pairs to any
sort of client identification process in the wagon?

http, http-lightweight, and webdav would obviously include http request
headers.
ftp, file, and ssh providers would essentially ignore the
ClientProperties provided.

Should we prevent, or allow, the ability to set any of the standard
client properties?  Such as 'USER_AGENT', or 'REFERER'?
I'm leaning towards allowing it, but tossing a warning when it an
overwrite situation occurs.

Sound good?

- Joakim

Jason van Zyl wrote:

> Joakime,
>
> Do you think you could add something that would allow us to add to set
> of headers that are sent to a client, and set the client string? In
> Maven I would like to accurately keep track of what versions of Maven
> are actively in use and I think being able to send version information
> along with the request and/or version numbers in the client string
> would help us tremendously in knowing who is actually using what.
>
> Jason.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wagon-dev-unsubscribe@...
> For additional commands, e-mail: wagon-dev-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-dev-unsubscribe@...
For additional commands, e-mail: wagon-dev-help@...


Re: Being able to modify HTTP headers for a request

by Jason van Zyl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 14 Dec 06, at 12:24 PM 14 Dec 06, Joakim Erdfelt wrote:

> I would like to have this optionally work across all current (and
> future) wagon wheels (providers).
>
> How about the following methods?
> for reference ->
> http://maven.apache.org/wagon/wagon-provider-api/apidocs/org/apache/ 
> maven/wagon/Wagon.html
>
> Wagon.setClientProperties( Properties );
> Wagon.setClientProperty( String key, String value );
>
> That way, you can provide the data, pass it anonymously to the active
> wagon, and (if the wagon supports it), add those key/value pairs to  
> any
> sort of client identification process in the wagon?
>

Good idea.

> http, http-lightweight, and webdav would obviously include http  
> request
> headers.
> ftp, file, and ssh providers would essentially ignore the
> ClientProperties provided.
>
> Should we prevent, or allow, the ability to set any of the standard
> client properties?  Such as 'USER_AGENT', or 'REFERER'?

The USER_AGENT is something I would like to be able to set. For  
example in Maven I want to set it.

> I'm leaning towards allowing it, but tossing a warning when it an
> overwrite situation occurs.

Yah, it's up to people using the code. Let them do what they want.  
What's the harm?

>
> Sound good?
>

+1

> - Joakim
>
> Jason van Zyl wrote:
>> Joakime,
>>
>> Do you think you could add something that would allow us to add to  
>> set
>> of headers that are sent to a client, and set the client string? In
>> Maven I would like to accurately keep track of what versions of Maven
>> are actively in use and I think being able to send version  
>> information
>> along with the request and/or version numbers in the client string
>> would help us tremendously in knowing who is actually using what.
>>
>> Jason.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: wagon-dev-unsubscribe@...
>> For additional commands, e-mail: wagon-dev-help@...
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wagon-dev-unsubscribe@...
> For additional commands, e-mail: wagon-dev-help@...
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-dev-unsubscribe@...
For additional commands, e-mail: wagon-dev-help@...

LightInTheBox - Buy quality products at wholesale price