<span class="gmail_quote">On 8/17/07, <b class="gmail_sendername">Jeremy Thurgood</b> <<a href="mailto:jerith@jerith.za.net">jerith@jerith.za.net</a>> wrote:</span>It looks like your auth failures are <br><br>[hexify code]
<br><br>Let me give my hexify version as well. I don't know which is most correct or fastest. I am<br>mostly concerned about the correctness. According to RFC1738, you may actually encode<br>everything, even unreserved characters, but there are parsers which fails if you try that.
<br><br>What characters are unreserved is given in RFC3986:<br><br>rfc_3986_unreserved_characters() -><br> "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.~".<br><br>rfc_3986_unreserved_characters_set() ->
<br> sets:from_list(rfc_3986_unreserved_characters()).<br><br>%%--------------------------------------------------------------------<br>%% Function: build_uri_encoded_form_rfc1738(List) -> String<br>%% Description: Convert the list into RFC1738 encoding (URL-encoding).
<br>%%--------------------------------------------------------------------<br>build_uri_encoded_form_rfc1738(List) -><br> Unreserved = rfc_3986_unreserved_characters_set(),<br> lists:flatten(lists:map(<br> fun (E) ->
<br> case sets:is_element(E, Unreserved) of<br> true -><br> E;<br> false -><br> lists:concat(<br> ["%", io_lib:format("~2.16.0B", [E])])
<br> end<br> end,<br> List)).<br><br>