[Freeipa-devel] [PATCH] 368 remove some duplicate code

Rob Crittenden rcritten at redhat.com
Mon Feb 8 16:03:15 UTC 2010


John Dennis wrote:
> On 02/02/2010 10:56 PM, Rob Crittenden wrote:
>> Move the dogtag HTTP and HTTPS request functions to a common library to
>> remove duplication.
>>
>> I'm next planning on moving the XML parsing code into ipapython/dogtag
>> because that is needed by the installer as well to identify errors. This
>> is going to be quite a bit messier I think.
> 
> There are a couple of minor things which need cleaning up.
> 
> The new functions https_request and http_request are not general request 
> mechanisms because the request type is hardcoded to POST and the headers 
> are hardcoded as well. We need to either change the names to https_post 
> and http_post -or- add parameters specifying the request type and 
> headers. POST is specialized enough and called often enough I think the 
> first option is best, just rename the function to what it actually is, a 
> post request.
> 
> The logging statements still refer to the old function names, they 
> should be updated to match the name of the function.
> 
> If all you do is just edit the names I don't think you need to repost 
> the patch, I'll ACK it now.
> 

Yeah, I had the same thoughts on the naming. I decided to go with them 
since the context is within dogtag and not a general HTTP/S client. I'm 
ok with renaming them again for clarity/maintainability.

rob




More information about the Freeipa-devel mailing list