base64: added Curl_base64url_encode()

This is now used by the http2 code. It has two different symbols at the
end of the base64 table to make the output "url safe".

Bug: https://github.com/tatsuhiro-t/nghttp2/issues/62
This commit is contained in:
Daniel Stenberg 2014-07-25 08:24:03 +02:00
parent 9c1cf96664
commit aae4e4bf70
3 changed files with 66 additions and 26 deletions

View file

@ -504,8 +504,8 @@ CURLcode Curl_http2_request_upgrade(Curl_send_buffer *req,
}
conn->proto.httpc.binlen = binlen;
result = Curl_base64_encode(conn->data, (const char *)binsettings, binlen,
&base64, &blen);
result = Curl_base64url_encode(conn->data, (const char *)binsettings, binlen,
&base64, &blen);
if(result)
return result;