eeichinger / testingaspnet

Automatically exported from code.google.com/p/testingaspnet
0 stars 0 forks source link

Non standards HTTP Request Headers are not sent to the server side HttpRequest. #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Non standards HTTP Request Headers are not sent to the server side HttpRequest.
What steps will reproduce the problem?
1. Aplique o remendo 'patch_r51_01.patch'(Atached). This will generate the 
files: 'arbitraryHeader.aspx' and method 
'NUnitAspExTests.AspTestClientTests.ArbitraryHeaderInHost()'. This will create 
another test to reproduce the problem.
2. Run the test in NUnit.

What is the expected output? What do you see instead?
The expected result should be "arbitrary-header=arbitrary-value". The result is 
"arbitrary-header not found!"

What version of the product are you using? On what operating system?
r51

Please provide any additional information below.
Apply the patch 'patch_r51_02.patch'. This will insert the method 
'NUnitAspEx.Core.AspFixtureRequestWorkerRequest.GetUnknownRequestHeaders()'. 
This will make the test 
'NUnitAspExTests.AspTestClientTests.ArbitraryHeaderInHost()' pass.

Original issue reported on code.google.com by hailtond...@gmail.com on 28 Aug 2011 at 2:06

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry, I wrote in Portuguese.
fixing:
...
What steps will reproduce the problem?
1. Apply the patch patch_r51_01.patch '(Atached). This will generate the ...
...

Original comment by hailtond...@gmail.com on 28 Aug 2011 at 3:31

GoogleCodeExporter commented 9 years ago
I found another two errors: 
1) "AspFixtureRequestWorkerRequest.GetLocalPort()"  is necessary that a 
negative value is not passed as a  "port number". Otherwise, in a call to 
"Page.Request.Url" an exception will occur. It's the same exception that occurs 
in  'new Uri("http://127.0.0.1:-1/Test.aspx")'
2) "Page within subfolders" generate error when requested.

The file "patch_r51_03.patch" reproduces the error, "patch_r51_04.patch" fixes 
the problem and "patch_r51_01_to_04.patch" is the "cumulative patch" with 1, 2, 
3 and 4

Original comment by hailtond...@gmail.com on 1 Sep 2011 at 2:18

Attachments:

GoogleCodeExporter commented 9 years ago
I suggest the creation of two new methods in "NUnitAspEx.Client.HttpWebClient."
   -void PrepareRequest (HttpWebRequest request): Load the "Header values" and "cookie values" within "request";
   -void UpdateFromResponse (HttpWebResponse response): Updates the client from the client response. 

I believe they are necessary to be able to work better with the HttpWebRequest 
obtained from "public HttpWebRequest CreateWebRequest (string virtualPath)". 
Otherwise would occur problems such as "losing the session" for lack of cookies

Original comment by hailtond...@gmail.com on 4 Sep 2011 at 5:14

Attachments:

GoogleCodeExporter commented 9 years ago
Sorry for not to have explained the contents of the files: The file 
"patch_r51_05.patch" contains the methods I suggested. The file 
"patch_r51_01_to_05.patch "  is the "cumulative patch" with 1, 2, 3, 4 and 5.

Original comment by hailtond...@gmail.com on 4 Sep 2011 at 5:18