You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by James Peach <jp...@apache.org> on 2016/04/18 16:28:39 UTC

Re: [trafficserver] branch master updated: TS-4312 Add config to strictly parse URL according to RFC 3986. This closes #574

> On Apr 18, 2016, at 1:05 AM, briang@apache.org wrote:
> 
> This is an automated email from the ASF dual-hosted git repository.
> 
> briang pushed a commit to branch master
> in repository https://git-dual.apache.org/repos/asf/trafficserver.git
> 
> The following commit(s) were added to refs/heads/master by this push:
>       new  9f9dc38   TS-4312 Add config to strictly parse URL according to RFC 3986. This closes #574
> 9f9dc38 is described below
> 
> 
[snip]
> +
> +REGRESSION_TEST(ParseRules_strict_URI)(RegressionTest *t, int /* level ATS_UNUSED */, int *pstatus)
> +{
> +  const struct {
> +    const char *const uri;
> +    bool valid;
> +  } http_strict_uri_parsing_test_case[] = {{"/home", true},
> +                                           {"/path/data?key=value#id", true},
> +                                           {"/ABCDEFGHIJKLMNOPQRSTUVWXYZ", true},
> +                                           {"/abcdefghijklmnopqrstuvwxyz", true},
> +                                           {"/0123456789", true},
> +                                           {":/?#[]@", true},
> +                                           {"!$&'()*+,;=", true},
> +                                           {"-._~", true},
> +                                           {"%", true},
> +                                           {"\n", false},
> +                                           {"\"", false},
> +                                           {"<", false},
> +                                           {">", false},
> +                                           {"\\", false},
> +                                           {"^", false},
> +                                           {"`", false},
> +                                           {"{", false},
> +                                           {"|", false},
> +                                           {"}", false},
> +                                           {"é", false}};
> +
> +  TestBox box(t, pstatus);
> +  box = REGRESSION_TEST_PASSED;
> +
> +  for (unsigned int i = 0; i < sizeof(http_strict_uri_parsing_test_case) / sizeof(http_strict_uri_parsing_test_case[0]); ++i) {

countof(http_strict_uri_parsing_test_case)



Re: [trafficserver] branch master updated: TS-4312 Add config to strictly parse URL according to RFC 3986. This closes #574

Posted by Brian Geffon <br...@gmail.com>.
Will fix in a few hours.

On Monday, April 18, 2016, James Peach <jp...@apache.org> wrote:

>
> > On Apr 18, 2016, at 1:05 AM, briang@apache.org <javascript:;> wrote:
> >
> > This is an automated email from the ASF dual-hosted git repository.
> >
> > briang pushed a commit to branch master
> > in repository https://git-dual.apache.org/repos/asf/trafficserver.git
> >
> > The following commit(s) were added to refs/heads/master by this push:
> >       new  9f9dc38   TS-4312 Add config to strictly parse URL according
> to RFC 3986. This closes #574
> > 9f9dc38 is described below
> >
> >
> [snip]
> > +
> > +REGRESSION_TEST(ParseRules_strict_URI)(RegressionTest *t, int /* level
> ATS_UNUSED */, int *pstatus)
> > +{
> > +  const struct {
> > +    const char *const uri;
> > +    bool valid;
> > +  } http_strict_uri_parsing_test_case[] = {{"/home", true},
> > +                                           {"/path/data?key=value#id",
> true},
> > +
>  {"/ABCDEFGHIJKLMNOPQRSTUVWXYZ", true},
> > +
>  {"/abcdefghijklmnopqrstuvwxyz", true},
> > +                                           {"/0123456789", true},
> > +                                           {":/?#[]@", true},
> > +                                           {"!$&'()*+,;=", true},
> > +                                           {"-._~", true},
> > +                                           {"%", true},
> > +                                           {"\n", false},
> > +                                           {"\"", false},
> > +                                           {"<", false},
> > +                                           {">", false},
> > +                                           {"\\", false},
> > +                                           {"^", false},
> > +                                           {"`", false},
> > +                                           {"{", false},
> > +                                           {"|", false},
> > +                                           {"}", false},
> > +                                           {"é", false}};
> > +
> > +  TestBox box(t, pstatus);
> > +  box = REGRESSION_TEST_PASSED;
> > +
> > +  for (unsigned int i = 0; i <
> sizeof(http_strict_uri_parsing_test_case) /
> sizeof(http_strict_uri_parsing_test_case[0]); ++i) {
>
> countof(http_strict_uri_parsing_test_case)
>
>
>