X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web%2FHttpResponse.cs;h=9aa99d9244bba7f1fefdf3e5dd6a763be74ae5a0;hb=dff680e41a6368bee2f6a65395b7bfda59c09631;hp=19dd29da7bd35fd130608826b652321b03a780e5;hpb=4e163fb9061c5f0e7446cdb40e1297e67be9931e;p=mono.git diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs index 19dd29da7bd..9aa99d9244b 100644 --- a/mcs/class/System.Web/System.Web/HttpResponse.cs +++ b/mcs/class/System.Web/System.Web/HttpResponse.cs @@ -7,7 +7,7 @@ // Gonzalo Paniagua Javier (gonzalo@ximian.com) // Marek Habersack // -// Copyright (C) 2005-2009 Novell, Inc (http://www.novell.com) +// Copyright (C) 2005-2010 Novell, Inc (http://www.novell.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the @@ -88,7 +88,7 @@ namespace System.Web // the headers that we compute here. // - NameValueCollection headers; + HttpHeaderCollection headers; bool headers_sent; NameValueCollection cached_headers; @@ -151,7 +151,12 @@ namespace System.Web return version_header; } } - + + internal HttpContext Context { + get { return context; } + set { context = value; } + } + internal string[] FileDependencies { get { if (fileDependencies == null || fileDependencies.Count == 0) @@ -319,7 +324,7 @@ namespace System.Web public NameValueCollection Headers { get { if (headers == null) - headers = new NameValueCollection (); + headers = new HttpHeaderCollection (); return headers; } @@ -497,8 +502,7 @@ namespace System.Web public void AppendHeader (string name, string value) { if (headers_sent) - throw new HttpException ("headers have been already sent"); - + throw new HttpException ("Headers have been already sent"); #if !TARGET_J2EE if (String.Compare (name, "content-length", true, Helpers.InvariantCulture) == 0){ content_length = (long) UInt64.Parse (value); @@ -537,7 +541,7 @@ namespace System.Web public string ApplyAppPathModifier (string virtualPath) { - if (virtualPath == null) + if (virtualPath == null || context == null) return null; if (virtualPath.Length == 0)