~ubuntu-branches/ubuntu/lucid/mono/lucid

« back to all changes in this revision

Viewing changes to mcs/class/System/System.Net/HttpWebRequest.cs

  • Committer: Bazaar Package Importer
  • Author(s): Mirco Bauer
  • Date: 2009-07-30 19:35:10 UTC
  • mto: (5.2.2 squeeze)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090730193510-cdttfvqokq2kmdvh
Tags: upstream-2.4.2.3+dfsg
ImportĀ upstreamĀ versionĀ 2.4.2.3+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
                object locker = new object ();
99
99
                bool is_ntlm_auth;
100
100
                bool finished_reading;
 
101
#if NET_2_0
 
102
                DecompressionMethods auto_decomp;
 
103
#endif
101
104
#if NET_1_1
102
105
                int maxResponseHeadersLength;
103
106
                static int defaultMaxResponseHeadersLength;
192
195
                        return new NotImplementedException ();
193
196
                }
194
197
                
195
 
                [MonoTODO]
196
198
                public DecompressionMethods AutomaticDecompression
197
199
                {
198
200
                        get {
199
 
                                throw GetMustImplement ();
 
201
                                return auto_decomp;
200
202
                        }
201
203
                        set {
202
 
                                throw GetMustImplement ();
 
204
                                CheckRequestStarted ();
 
205
                                auto_decomp = value;
203
206
                        }
204
207
                }
205
208
#endif
741
744
                {
742
745
                        bool send = (method == "PUT" || method == "POST");
743
746
                        if (send) {
744
 
                                if ((!KeepAlive || (ContentLength == -1 && !SendChunked)) && !AllowWriteStreamBuffering)
 
747
                                if (ContentLength == -1 && !SendChunked && !AllowWriteStreamBuffering)
745
748
                                        throw new ProtocolViolationException ("Content-Length not set");
746
749
                        }
747
750
 
1024
1027
                                        webHeaders.SetInternal ("Cookie", cookieHeader);
1025
1028
                        }
1026
1029
 
 
1030
#if NET_2_0
 
1031
                        string accept_encoding = null;
 
1032
                        if ((auto_decomp & DecompressionMethods.GZip) != 0)
 
1033
                                accept_encoding = "gzip";
 
1034
                        if ((auto_decomp & DecompressionMethods.Deflate) != 0)
 
1035
                                accept_encoding = accept_encoding != null ? "gzip, deflate" : "deflate";
 
1036
                        if (accept_encoding != null)
 
1037
                                webHeaders.SetInternal ("Accept-Encoding", accept_encoding);
 
1038
#endif
1027
1039
                        if (!usedPreAuth && preAuthenticate)
1028
1040
                                DoPreAuthenticate ();
1029
1041