[erlang-questions] FW: A patch for ibrowse to extend save_response_to_file behavior

Chandru chandrashekhar.mullaparthi@REDACTED
Fri Feb 8 06:34:08 CET 2008


Hi,

In case anyone is using the save_response_to_file feature in ibrowse,
an enhancement and bug fix has been made. The current version in
sourceforge is 1.3.0. You can now specify the filename to save the
response to.

Thanks to Ram Krishnan for providing a patch.

http://jungerl.cvs.sourceforge.net/jungerl/jungerl/lib/ibrowse/

Chandru

---------- Forwarded message ----------
From: Chandru <chandrashekhar.mullaparthi@REDACTED>
Date: 7 Feb 2008 12:05
Subject: Re: FW: A patch for ibrowse to extend save_response_to_file behavior
To: Ram Krishnan

Hi Ram,

Thanks a lot for the patch. I've been meaning to implement this
feature for a long time now.

While I was testing your patch, I found quite a few bugs in my
original implementation of this feature so I've fixed the code to
handle this properly. I've also updated the documentation and checked
it all into CVS.

I've attached the new modules for your convenience. Only
ibrowse_http_client.erl has had a code change. ibrowse.erl only has
changes to the comments.

cheers
Chandru

>
> -----Original Message-----
> From: Ram Krishnan
> Sent: 07 February 2008 04:22
> To: Chandrashekhar Mullaparthi
> Subject: A patch for ibrowse to extend save_response_to_file behavior
>
> Hi,
>
> Firstly, thanks very much for the excellent ibrowse http client package that
> you've contributed to Erlang.
>
> Secondly, I've attached a small patch (cvs diff -u8) which changes the
> save_response_to_file option to accept a boolean or a file path as its
> value. For example,
>
> ibrowse:send_req(
>          Url,
>          [],
>          get,
>          [],
>          [{save_response_to_file, "/tmp/foo.txt"}])
>
> This makes it easy to have each ibrowse request store the response to
> different locations when required; instead of a rename (or worse doing a
> copy/delete across filesystems).
>
> Hopefully you will find this patch acceptable. I'm a Lisp programmer, and
> recent Erlang convert so I would welcome any feedback you might have on the
> changes.
>
> Thanks.
>
> -ram



More information about the erlang-questions mailing list