You've already forked linux-packaging-mono
Imported Upstream version 5.14.0.78
Former-commit-id: 3494343bcc9ddb42b36b82dd9ae7b69e85e0229f
This commit is contained in:
parent
74b74abd9f
commit
19234507ba
@@ -242,7 +242,7 @@ endif
|
||||
TXT_RESOURCE_STRINGS = ../referencesource/System.Web/System.Web.txt
|
||||
|
||||
LIB_REFS = System System.Core System.Drawing System.Data System.Xml System.EnterpriseServices System.Runtime.Serialization.Formatters.Soap \
|
||||
System.ComponentModel.DataAnnotations System.Web.ApplicationServices System.Configuration Mono.Data.Sqlite
|
||||
System.ComponentModel.DataAnnotations System.Web.ApplicationServices System.Configuration Mono.Data.Sqlite System.Web.Services System.Design
|
||||
KEYFILE = ../msfinal.pub
|
||||
LIB_MCS_FLAGS = \
|
||||
-unsafe \
|
||||
@@ -251,13 +251,7 @@ LIB_MCS_FLAGS = \
|
||||
$(RESX_RES:%=/resource:%) \
|
||||
$(OTHER_RES:%=/resource:%)
|
||||
|
||||
ifneq (plainweb/,$(intermediate))
|
||||
LIB_REFS += System.Web.Services plaindesign/System.Design
|
||||
LIB_MCS_FLAGS += -define:WEBSERVICES_DEP
|
||||
|
||||
all-local: System.Web/UplevelHelper.cs
|
||||
|
||||
endif
|
||||
#all-local: System.Web/UplevelHelper.cs
|
||||
|
||||
TEST_LIB_REFS = SystemWebTestShim
|
||||
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -doc:$(test_lib:.dll=.xml) -nowarn:219,169,1591 \
|
||||
@@ -287,19 +281,6 @@ BUILT_SOURCES = System.Web/UplevelHelper.cs
|
||||
|
||||
include ../../build/library.make
|
||||
|
||||
$(the_libdir_base)System.Web.dll: $(the_libdir_base)System.Web.Services.dll
|
||||
|
||||
$(the_libdir_base)System.Web.Services.dll:
|
||||
(cd ../System.Web.Services; $(MAKE) $@)
|
||||
|
||||
ifneq (plainweb/,$(intermediate))
|
||||
$(the_libdir_base)plainweb/System.Web.dll:
|
||||
$(MAKE) intermediate=plainweb/ $(the_libdir_base)plainweb/System.Web.dll
|
||||
|
||||
endif
|
||||
|
||||
.NOTPARALLEL: $(the_libdir_base)plainweb/System.Web.dll $(the_libdir_base)System.Web.Services.dll
|
||||
|
||||
ifdef DEBUG
|
||||
LIB_MCS_FLAGS += -define:DEBUG
|
||||
endif
|
||||
@@ -430,10 +411,3 @@ ifdef STANDALONE_TEST_COMPILABLE_TESTS
|
||||
$(MAKE) -C Test/standalone/$$d clean ; \
|
||||
done
|
||||
endif
|
||||
|
||||
ifndef intermediate
|
||||
ifneq ($(PROFILE),basic)
|
||||
csproj-local:
|
||||
$(MAKE) csproj-local intermediate=plainweb/
|
||||
endif
|
||||
endif
|
||||
|
@@ -31,9 +31,7 @@
|
||||
|
||||
using System;
|
||||
using System.Configuration;
|
||||
#if WEBSERVICES_DEP
|
||||
using System.Web.Services.Configuration;
|
||||
#endif
|
||||
|
||||
namespace System.Web.Configuration
|
||||
{
|
||||
@@ -205,12 +203,10 @@ namespace System.Web.Configuration
|
||||
get { return (WebPartsSection)Sections ["webParts"]; }
|
||||
}
|
||||
|
||||
#if WEBSERVICES_DEP
|
||||
[ConfigurationProperty ("webServices")]
|
||||
public WebServicesSection WebServices {
|
||||
get { return (WebServicesSection)Sections ["webServices"]; }
|
||||
}
|
||||
#endif
|
||||
|
||||
[ConfigurationProperty ("xhtmlConformance")]
|
||||
public XhtmlConformanceSection XhtmlConformance {
|
||||
|
@@ -841,7 +841,7 @@ namespace System.Web
|
||||
byte [] buffer;
|
||||
buffer = worker_request.GetPreloadedEntityBody ();
|
||||
// we check the instance field 'content_length' here, not the local var.
|
||||
if (this.content_length <= 0 || worker_request.IsEntireEntityBodyIsPreloaded ()) {
|
||||
if (this.content_length == 0 || worker_request.IsEntireEntityBodyIsPreloaded ()) {
|
||||
if (buffer == null || content_length == 0) {
|
||||
input_stream = new MemoryStream (new byte [0], 0, 0, false, true);
|
||||
} else {
|
||||
@@ -2068,11 +2068,19 @@ namespace System.Web
|
||||
|
||||
static string GetContentDispositionAttribute (string l, string name)
|
||||
{
|
||||
int idx = l.IndexOf (name + "=\"");
|
||||
int idx = l.IndexOf (name + "=");
|
||||
if (idx < 0)
|
||||
return null;
|
||||
int begin = idx + name.Length + "=\"".Length;
|
||||
int end = l.IndexOf ('"', begin);
|
||||
int begin = idx + name.Length + "=".Length;
|
||||
int end;
|
||||
if (l.Length > begin && l [begin] == '"') {
|
||||
begin++;
|
||||
end = l.IndexOf ('"', begin);
|
||||
} else {
|
||||
end = l.IndexOf (';', begin);
|
||||
if (end == -1)
|
||||
end = l.Length;
|
||||
}
|
||||
if (end < 0)
|
||||
return null;
|
||||
if (begin == end)
|
||||
@@ -2082,11 +2090,19 @@ namespace System.Web
|
||||
|
||||
string GetContentDispositionAttributeWithEncoding (string l, string name)
|
||||
{
|
||||
int idx = l.IndexOf (name + "=\"");
|
||||
int idx = l.IndexOf (name + "=");
|
||||
if (idx < 0)
|
||||
return null;
|
||||
int begin = idx + name.Length + "=\"".Length;
|
||||
int end = l.IndexOf ('"', begin);
|
||||
int begin = idx + name.Length + "=".Length;
|
||||
int end;
|
||||
if (l.Length > begin && l [begin] == '"') {
|
||||
begin++;
|
||||
end = l.IndexOf ('"', begin);
|
||||
} else {
|
||||
end = l.IndexOf (';', begin);
|
||||
if (end == -1)
|
||||
end = l.Length;
|
||||
}
|
||||
if (end < 0)
|
||||
return null;
|
||||
if (begin == end)
|
||||
|
@@ -1055,5 +1055,47 @@ namespace MonoTests.System.Web {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// This test ensures the HttpRequest object's InputStream property
|
||||
// gets properly constructed and populated when the request is not
|
||||
// preloaded.
|
||||
[TestFixture]
|
||||
public class Test_NonPreloadedRequest
|
||||
{
|
||||
private const string expected = "Hello, World!\n";
|
||||
|
||||
class FakeHttpWorkerRequest : BaseFakeHttpWorkerRequest
|
||||
{
|
||||
private readonly Stream body = new MemoryStream(Encoding.UTF8.GetBytes(expected));
|
||||
|
||||
public override string GetHttpVerbName()
|
||||
{
|
||||
return "POST";
|
||||
}
|
||||
|
||||
public override int ReadEntityBody(byte[] buffer, int size)
|
||||
{
|
||||
return body.Read(buffer, 0, size);
|
||||
}
|
||||
}
|
||||
|
||||
HttpContext context = null;
|
||||
|
||||
[SetUp]
|
||||
[Category ("NotDotNet")] // Cannot be runned on .net with no web context
|
||||
public void SetUp()
|
||||
{
|
||||
HttpWorkerRequest workerRequest = new FakeHttpWorkerRequest();
|
||||
context = new HttpContext(workerRequest);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Category ("NotDotNet")] // Cannot be runned on .net with no web context
|
||||
public void InputStream_Contents()
|
||||
{
|
||||
Assert.AreEqual(expected, new StreamReader(context.Request.InputStream, Encoding.UTF8).ReadToEnd());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,8 @@ STANDALONE_RUNNER_SOURCES = \
|
||||
STANDALONE_RUNNER_REFERENCES = \
|
||||
-r:$(STANDALONE_RUNNER_SUPPORT_ASSEMBLY) \
|
||||
-r:$(CLASSLIB_DIR)/System.Web.dll \
|
||||
-r:$(CLASSLIB_DIR)/System.dll
|
||||
-r:$(CLASSLIB_DIR)/System.dll \
|
||||
-r:$(CLASSLIB_DIR)/mscorlib.dll
|
||||
|
||||
CACHE_PQ_TEST_GENERATOR_SOURCES = \
|
||||
CachePQTestGenerator/CacheItemComparer.cs \
|
||||
|
Reference in New Issue
Block a user