[Yum-devel] enable yum to pass http data to repository

Bryan Mills bryan at mills1.net
Mon Nov 14 15:07:47 UTC 2005


Bryan Mills wrote:

> seth vidal wrote:
>
>> Bryan, If you're interested in making the changes to include options 
>> to the
>> urls, would you be be willing to add user agent defines as a global and
>> per-repo option?
>>  
>>
> Sure.  I'm willing to make these changes:
> 1) http get parameters on a per-repo basis
> 2) ability to indicate the type of request GET or POST
> 3) add user-agent on both a global and per-repo basis

Here is my initial set of changes.  In this patch-set I made changes to 
urlgrabber.  Specifically how it handles the mirror list so that it 
understands the syntax:
http://blah.foo.com/?name=joe
and inserts the relative fetching url correctly in between the baseurl 
and query part.
The grab function on the mirror also takes an optional http_method that 
defaults to 'get' behavior.

The other option is to create grabber instances in the yum code and pass 
those into the mirror __init__.  This works if we want to only 'post' 
the data but the grabber object has no way of storing the query part for 
get requests.  Because when we say mirrors.grab we don't know which 
mirror will be selected that information has to be encoded in the mirror 
data structure somehow not just in yum.  So if we wanted to create 
urlgrabber instances in the yum code then we still need urlgrabber to 
understand what a query is and have someway of saying to send that data 
as a post or a get.

Open to suggestions.

Also is there a cvs tree for urlgrabber?  I patched off of the latest 
tar-ball.

-bryan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: urlgrabber_add_http_query_to_mirror.patch
Type: text/x-patch
Size: 2022 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20051114/65c0e08f/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum_http_data_and_user_agent.patch
Type: text/x-patch
Size: 4687 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20051114/65c0e08f/attachment-0001.bin 


More information about the Yum-devel mailing list