tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1817105 - in /tomcat/trunk: java/org/apache/catalina/core/ApplicationPushBuilder.java webapps/docs/changelog.xml
Date Mon, 04 Dec 2017 17:05:59 GMT
On 04/12/17 16:59, remm@apache.org wrote:
> Author: remm
> Date: Mon Dec  4 16:59:12 2017
> New Revision: 1817105
> 
> URL: http://svn.apache.org/viewvc?rev=1817105&view=rev
> Log:
> Minor push builder fixes: don't remove the auth header,

-1.

The Javadoc for PushBuilder explicitly lists Authorization headers as
one of the types that are not transferred to the pushed request.

> and exception on an empty method.

Good catch.

Mark

[1]
https://github.com/javaee/servlet-spec/blob/master/src/main/java/javax/servlet/http/PushBuilder.java



> 
> Modified:
>     tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java
>     tomcat/trunk/webapps/docs/changelog.xml
> 
> Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java?rev=1817105&r1=1817104&r2=1817105&view=diff
> ==============================================================================
> --- tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java (original)
> +++ tomcat/trunk/java/org/apache/catalina/core/ApplicationPushBuilder.java Mon Dec  4
16:59:12 2017
> @@ -98,7 +98,6 @@ public class ApplicationPushBuilder impl
>          headers.remove("if-range");
>          headers.remove("range");
>          headers.remove("expect");
> -        headers.remove("authorization");
>          headers.remove("referer");
>          // Also remove the cookie header since it will be regenerated
>          headers.remove("cookie");
> @@ -108,7 +107,6 @@ public class ApplicationPushBuilder impl
>          if (request.getQueryString() != null) {
>              referer.append('?');
>              referer.append(request.getQueryString());
> -
>          }
>          addHeader("referer", referer.toString());
>  
> @@ -184,7 +182,7 @@ public class ApplicationPushBuilder impl
>      @Override
>      public PushBuilder method(String method) {
>          String upperMethod = method.trim().toUpperCase();
> -        if (DISALLOWED_METHODS.contains(upperMethod)) {
> +        if (DISALLOWED_METHODS.contains(upperMethod) || upperMethod.length() == 0) {
>              throw new IllegalArgumentException(
>                      sm.getString("applicationPushBuilder.methodInvalid", upperMethod));
>          }
> 
> Modified: tomcat/trunk/webapps/docs/changelog.xml
> URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1817105&r1=1817104&r2=1817105&view=diff
> ==============================================================================
> --- tomcat/trunk/webapps/docs/changelog.xml (original)
> +++ tomcat/trunk/webapps/docs/changelog.xml Mon Dec  4 16:59:12 2017
> @@ -53,6 +53,9 @@
>        <fix>
>          Update the Java EE 8 XML schema to the released versions. (markt)
>        </fix>
> +      <fix>
> +        Minor HTTP/2 push fixes. (remm)
> +      </fix>
>      </changelog>
>    </subsection>
>    <subsection name="Coyote">
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message