Permalink
Browse files

[fix] stdlib: WebClient now uses user specified headers.

  • Loading branch information...
1 parent 66928cf commit 08a58f6c4063d6261fd6f2fafba12d6cbdaab000 Thomas Refis committed Sep 13, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 stdlib/core/web/client/web_client.opa
View
4 stdlib/core/web/client/web_client.opa
@@ -562,7 +562,7 @@ WebClient =
| {none} -> 0
| ~{some} -> String.length(some)
post_headers = "Content-Length: {length}\r\nContent-Type: {options.mimetype}\r\n"
- headers = match default_options.custom_headers with
+ headers = match options.custom_headers with
| {none} -> post_headers
| ~{some} -> "{post_headers}{some}"
generic_options = {
@@ -720,7 +720,7 @@ WebClient =
try_put_with_options_async(location:Uri.uri, content:string, options:WebClient.Put.options, on_result: WebClient.result(string) -> void): void =
length = String.length(content)
put_headers = "Content-Length: {length}\r\nContent-Type: {options.mimetype}\r\n"
- headers = match default_options.custom_headers with
+ headers = match options.custom_headers with
| {none} -> put_headers
| ~{some} -> "{put_headers}{some}"
generic_options = {

0 comments on commit 08a58f6

Please sign in to comment.