Skip to content
This repository
Browse code

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

  • Loading branch information...
commit 08a58f6c4063d6261fd6f2fafba12d6cbdaab000 1 parent 66928cf
authored September 13, 2011

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  stdlib/core/web/client/web_client.opa
4  stdlib/core/web/client/web_client.opa
@@ -562,7 +562,7 @@ WebClient =
562 562
              | {none} -> 0
563 563
              | ~{some} -> String.length(some)
564 564
           post_headers = "Content-Length: {length}\r\nContent-Type: {options.mimetype}\r\n"
565  
-          headers = match default_options.custom_headers with
  565
+          headers = match options.custom_headers with
566 566
             | {none}  -> post_headers
567 567
             | ~{some} -> "{post_headers}{some}"
568 568
           generic_options = {
@@ -720,7 +720,7 @@ WebClient =
720 720
       try_put_with_options_async(location:Uri.uri, content:string, options:WebClient.Put.options, on_result: WebClient.result(string) -> void): void =
721 721
           length  = String.length(content)
722 722
           put_headers = "Content-Length: {length}\r\nContent-Type: {options.mimetype}\r\n"
723  
-          headers = match default_options.custom_headers with
  723
+          headers = match options.custom_headers with
724 724
             | {none}  -> put_headers
725 725
             | ~{some} -> "{put_headers}{some}"
726 726
           generic_options = {

0 notes on commit 08a58f6

Please sign in to comment.
Something went wrong with that request. Please try again.