[ 
https://issues.apache.org/jira/browse/HADOOP-10075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Kanter updated HADOOP-10075:
-----------------------------------
    Attachment: HADOOP-10075.003.patch

Posted a 003 patch.  Here's some notes on it:
# The bulk of the changes are in {{HttpServer2}} and pom files
# There's a lot of misc changes in other files all over the place because 
package names and class names/usage were changed slightly.  
# I verified that https works.
# I had a lot of trouble with the gzipped javascript files we have.  I tried a 
lot of different configurations and looking around online.  From what I can 
tell by looking at the Jetty code and using a debugger, it looks like Jetty 
won't serve {{.gz}} files unless the non-gz version is there.  They have checks 
that the non-gz file exists before checking for the {{.gz}} file:
https://github.com/eclipse/jetty.project/blob/jetty-9.3.x/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceCache.java#L235
https://github.com/eclipse/jetty.project/blob/jetty-9.3.x/jetty-server/src/main/java/org/eclipse/jetty/server/ResourceContentFactory.java#L63
Unfortunately, this means having both the gz and non-gz versions of the files 
(which is one of the reasons why the patch is so big).  I did verify that if 
the request says it accepts gzip, you'll get the smaller gzipped version of the 
file:
{noformat}
>> curl 'http://localhost:8088/static/jquery/jquery-1.8.2.min.js' --compressed 
>> -s -D - -o /dev/null
HTTP/1.1 200 OK
Date: Wed, 14 Sep 2016 20:46:50 GMT
Vary: Accept-Encoding
Last-Modified: Wed, 14 Sep 2016 18:58:48 GMT
Content-Type: application/javascript
Content-Encoding: gzip
Accept-Ranges: bytes
Content-Length: 33430
Server: Jetty(9.3.11.v20160721)
{noformat}
{noformat}
>> curl 'http://localhost:8088/static/jquery/jquery-1.8.2.min.js' -s -D - -o 
>> /dev/null
HTTP/1.1 200 OK
Date: Wed, 14 Sep 2016 20:46:51 GMT
Vary: Accept-Encoding
Last-Modified: Wed, 14 Sep 2016 18:58:48 GMT
Content-Type: application/javascript
Accept-Ranges: bytes
Content-Length: 93436
Server: Jetty(9.3.11.v20160721)
{noformat}
If anyone has any better ideas on how to get gz to work without the extra 
files, let me know and I'll change it.  That said, we're probably supposed to 
have both the gz and non-gz files so that we can serve the non-gz files if the 
browser doesn't support gz; otherwise, you get 404s instead.  So perhaps this 
is the correct thing to do anyway, and we had it wrong before.

> Update jetty dependency to version 9
> ------------------------------------
>
>                 Key: HADOOP-10075
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10075
>             Project: Hadoop Common
>          Issue Type: Improvement
>    Affects Versions: 2.2.0, 2.6.0
>            Reporter: Robert Rati
>            Assignee: Robert Kanter
>         Attachments: HADOOP-10075-002-wip.patch, HADOOP-10075.003.patch, 
> HADOOP-10075.patch
>
>
> Jetty6 is no longer maintained.  Update the dependency to jetty9.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to