[GitHub] trafficserver pull request #1078: TS-4930: Unfolds request headers that are ...

2016-10-18 Thread zwoop
Github user zwoop closed the pull request at:

https://github.com/apache/trafficserver/pull/1078


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1078: TS-4930: Unfolds request headers that are ...

2016-10-04 Thread jpeach
Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1078#discussion_r81870774
  
--- Diff: proxy/hdrs/MIME.cc ---
@@ -2435,6 +2435,12 @@ mime_scanner_get(MIMEScanner *S, const char 
**raw_input_s, const char *raw_input
 case MIME_PARSE_AFTER:
   // After a LF. Might be the end or a continuation.
   if (ParseRules::is_ws(*raw_input_c)) {
+char *unfold = const_cast(raw_input_c - 1);
+
+*unfold-- = ' ';
+if (ParseRules::is_cr(*unfold)) {
+  *unfold = ' ';
--- End diff --

We can't accept const data if we do this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1078: TS-4930: Unfolds request headers that are ...

2016-10-04 Thread jpeach
Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1078#discussion_r81870634
  
--- Diff: proxy/hdrs/HdrTest.cc ---
@@ -522,6 +524,16 @@ HdrTest::test_mime()
 return (failures_to_status("test_mime", 1));
   }
 
+  // Test the (new) continuation line folding to be correct. This should 
replace the
+  // \r\n with two spaces (so a total of three between "part1" and 
"part2").
+  int length;
+  const char *continuation = hdr.value_get("continuation", 12, );
+
+  if ((13 != length) || strncmp(continuation, "part1   part2", 13) || 
strncmp(continuation + 5, "   ", 3)) {
--- End diff --

This will be easier to debug if you separate each condition into a separate 
failure.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1078: TS-4930: Unfolds request headers that are ...

2016-10-04 Thread jpeach
Github user jpeach commented on a diff in the pull request:

https://github.com/apache/trafficserver/pull/1078#discussion_r81870644
  
--- Diff: proxy/hdrs/HdrTest.cc ---
@@ -474,7 +474,9 @@ HdrTest::test_url()
 int
 HdrTest::test_mime()
 {
-  static const char mime[] = {
+  // This can not be a static string (any more) since we unfold the headers
+  // in place.
--- End diff --

So the contents now get modified? If so, we need to pass in non-const 
pointers.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] trafficserver pull request #1078: TS-4930: Unfolds request headers that are ...

2016-10-04 Thread zwoop
GitHub user zwoop opened a pull request:

https://github.com/apache/trafficserver/pull/1078

TS-4930: Unfolds request headers that are using obs continuations

I also removed a file that is basically a duplication of another file, and 
this duplicated file is not used at all. This confused me as I was testing and 
updating the regression tests. Basically, that old test app is already 
incorporated into the regression tests.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zwoop/trafficserver TS-4930

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/trafficserver/pull/1078.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1078


commit d01e11b908b9368bf2e741d46626d989d9e76531
Author: Leif Hedstrom 
Date:   2016-10-04T17:22:05Z

TS-4930: Unfolds request headers that are using obs continuations

commit 544b343a37bda25a36ecb28f36a614b558ff43ab
Author: Leif Hedstrom 
Date:   2016-10-04T20:48:01Z

TS-4930: Removes an old test file, it duplicates HdrTest.cc




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---