[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetlib/System/Net HttpWebRequest.cs,1.9,1.10
From: |
Gopal.V <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetlib/System/Net HttpWebRequest.cs,1.9,1.10 HttpWebResponse.cs,1.3,1.4 |
Date: |
Tue, 19 Nov 2002 15:38:29 -0500 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System/Net
In directory subversions:/tmp/cvs-serv24608/System/Net
Modified Files:
HttpWebRequest.cs HttpWebResponse.cs
Log Message:
minor fix to array and uncomment the FIXMes in System/Net/HttpWebRe*
Index: HttpWebRequest.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/HttpWebRequest.cs,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** HttpWebRequest.cs 19 Nov 2002 05:04:38 -0000 1.9
--- HttpWebRequest.cs 19 Nov 2002 20:38:26 -0000 1.10
***************
*** 67,70 ****
--- 67,71 ----
private Stream outStream=null;
private WebResponse response=null;
+ private const String format="ddd, dd MMM yyyy HH*:mm:ss GMTzz";//HTTP
internal HttpWebRequest(Uri uri)
***************
*** 73,76 ****
--- 74,79 ----
this.originalUri=uri;
this.method="GET";
+ this.headers.SetInternal ("Host", uri.Authority);
+ this.headers.SetInternal ("Date",
DateTime.Now.ToUniversalTime().ToString(format));
}
***************
*** 176,179 ****
--- 179,183 ----
// which is the response stream as well
}
+ outStream.Flush();
this.response=new HttpWebResponse(this,this.outStream);
this.haveResponse=true; // I hope this is correct
***************
*** 375,379 ****
{
CheckHeadersSent();
- String format="ddd, dd MMM yyyy HH*:mm:ss
GMTzz";//convert to GMT
headers.SetInternal("IfModifiedSince",
value.ToString(format));
this.ifModifiedSince=value;
--- 379,382 ----
***************
*** 637,642 ****
writer.Write(requestString);
writer.Write(request.Headers.ToString());
- /* FIXME: remove when headers work */
- writer.Write("Host: localhost\r\n");
writer.Write("\r\n");// terminating CRLF
writer.Flush();
--- 640,643 ----
Index: HttpWebResponse.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Net/HttpWebResponse.cs,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** HttpWebResponse.cs 18 Nov 2002 21:44:45 -0000 1.3
--- HttpWebResponse.cs 19 Nov 2002 20:38:26 -0000 1.4
***************
*** 36,40 ****
private HttpStatusCode code=0;
private String desc=null;
- private long contentLength; /* FIXME: Remove when headers work */
internal HttpWebResponse(HttpWebRequest request,Stream dataStream)
{
--- 36,39 ----
***************
*** 73,82 ****
for(String s=ReadLine();s.Trim()!="";s=ReadLine())
{
! // headers.Add(s); // FIXME: after arraylist is fixed
! if(s.StartsWith("Content-Length: "))
! {
! this.contentLength=
! Int64.Parse((s.Substring("Content-Length:
".Length)).Trim());
! }
}
}
--- 72,76 ----
for(String s=ReadLine();s.Trim()!="";s=ReadLine())
{
! headers.Add(s);
}
}
***************
*** 175,180 ****
get
{
! return contentLength;
! //return Int64.Parse(headers["Content-Length"]); //
FIXME
}
}
--- 169,173 ----
get
{
! return Int64.Parse(headers["Content-Length"]);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetlib/System/Net HttpWebRequest.cs,1.9,1.10 HttpWebResponse.cs,1.3,1.4,
Gopal.V <address@hidden> <=