You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Sudheer Vinukonda (JIRA)" <ji...@apache.org> on 2015/05/21 14:39:00 UTC

[jira] [Comment Edited] (TS-3629) TS corrupts Link: header in response

    [ https://issues.apache.org/jira/browse/TS-3629?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14554213#comment-14554213 ] 

Sudheer Vinukonda edited comment on TS-3629 at 5/21/15 12:38 PM:
-----------------------------------------------------------------

[~oschaaf]: Can you pls take a look at this jira and see if this a bug in *pagespeed* or if there's anything missing in the way *pagespeed* is being enabled/configured?


was (Author: sudheerv):
[~oschaaf]: Can you pls take a look at this jira and see if there's anything missing in the way *pagespeed* is being enabled/configured?

> TS corrupts Link: header in response
> ------------------------------------
>
>                 Key: TS-3629
>                 URL: https://issues.apache.org/jira/browse/TS-3629
>             Project: Traffic Server
>          Issue Type: Bug
>            Reporter: Felicity Tarnell
>
> (Using 5.3.0 on 64-bit Linux.)
> We have an origin that links a {{Link}} header in its response.  Requesting the document directly from the origin (nginx) shows the correct header:
> {noformat}
> by-staging-1:~# curl -Ix localhost:81 http://plan-staging.torchboxapps.com/
> HTTP/1.1 200 OK
> Server: nginx
> Date: Thu, 21 May 2015 10:04:54 GMT
> Content-Type: text/html; charset=utf-8
> Connection: keep-alive
> Vary: Accept-Encoding
> Expires: Sun, 19 Nov 1978 05:00:00 GMT
> Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0
> Content-Language: en
> Link: <http://plan-staging.torchboxapps.com/>; rel="canonical",<http://plan-staging.torchboxapps.com/>; rel="shortlink"
> {noformat}
> However, requesting the same document from ATS, using the same origin, truncates the header:
> {noformat}
> <1 jobs> <exit 2> 152!klamath:~/tbx/puppet>curl -I https://plan-staging.torchboxapps.com/
> HTTP/1.1 200 OK
> Date: Thu, 21 May 2015 10:06:01 GMT
> Content-Type: text/html; charset=utf-8
> Vary: Accept-Encoding
> Expires: Sun, 19 Nov 1978 05:00:00 GMT
> Cache-Control: pre-check=0
> Content-Language: en
> Link: <https://plan-staging.torchboxapps.com/>; rel="shortlink
> Content-Length: 0
> Age: 0
> Connection: keep-alive
> Strict-Transport-Security: max-age=15552000
> Via: http/1.1 by-staging-1 (uScMsSf pSeN:t cCMi pSs )
> X-Cache: miss
> {noformat}
> (The reason for http vs. https is that ATS is terminating SSL, and the origin uses http only.)
> {{tcpdump}} shows that in the ATS request, the backend is sending the correct header:
> {noformat}
> 16:37:02.145579 IP 127.0.0.1.38756 > 127.0.0.1.81: Flags [P.], seq 1:376, ack 1, win 342, options [nop,nop,TS val 66617043 ecr 66617043], length 375
>         0x0000:  4500 01ab f8b6 4000 4006 4294 7f00 0001  E.....@.@.B.....
>         0x0010:  7f00 0001 9764 0051 170d 8668 cc19 17f9  .....d.Q...h....
>         0x0020:  8018 0156 ff9f 0000 0101 080a 03f8 7ed3  ...V..........~.
>         0x0030:  03f8 7ed3 4845 4144 2068 7474 703a 2f2f  ..~.HEAD.http://
>         0x0040:  706c 616e 2d73 7461 6769 6e67 2e74 6f72  plan-staging.tor
>         0x0050:  6368 626f 7861 7070 732e 636f 6d2f 2048  chboxapps.com/.H
>         0x0060:  5454 502f 312e 310d 0a41 7574 686f 7269  TTP/1.1..Authori
>         0x0070:  7a61 7469 6f6e 3a20 4261 7369 6320 xxxx  zation:.Basic...
>         0x0080:  xxxx xxxx xxxx xxxx xxxx xxxx xxxx xxxx  xxxxxxxxxxxxxxxx
>         0x0090:  xxxx xxxx xxxx xxxx xxxx xxxx xxxx 0d0a  xxxxxxxxxxxxxx..
>         0x00a0:  5573 6572 2d41 6765 6e74 3a20 6375 726c  User-Agent:.curl
>         0x00b0:  2f37 2e34 312e 300d 0a48 6f73 743a 2070  /7.41.0..Host:.p
>         0x00c0:  6c61 6e2d 7374 6167 696e 672e 746f 7263  lan-staging.torc
>         0x00d0:  6862 6f78 6170 7073 2e63 6f6d 0d0a 4163  hboxapps.com..Ac
>         0x00e0:  6365 7074 3a20 2a2f 2a0d 0a58 2d46 6f72  cept:.*/*..X-For
>         0x00f0:  7761 7264 6564 2d50 726f 746f 3a20 6874  warded-Proto:.ht
>         0x0100:  7470 730d 0a43 6c69 656e 742d 6970 3a20  tps..Client-ip:.
>         0x0110:  3932 2e32 312e 3135 332e 360d 0a58 2d46  92.21.153.6..X-F
>         0x0120:  6f72 7761 7264 6564 2d46 6f72 3a20 3932  orwarded-For:.92
>         0x0130:  2e32 312e 3135 332e 360d 0a56 6961 3a20  .21.153.6..Via:.
>         0x0140:  6874 7470 732f 312e 3120 6279 2d73 7461  https/1.1.by-sta
>         0x0150:  6769 6e67 2d31 5b43 3145 3346 3436 365d  ging-1[C1E3F466]
>         0x0160:  2028 4170 6163 6865 5472 6166 6669 6353  .(ApacheTrafficS
>         0x0170:  6572 7665 722f 352e 332e 3020 5b75 5363  erver/5.3.0.[uSc
>         0x0180:  4d73 2066 2070 2065 4e3a 7420 6343 4d69  Ms.f.p.eN:t.cCMi
>         0x0190:  2070 2073 205d 290d 0a50 6167 6553 7065  .p.s.])..PageSpe
>         0x01a0:  6564 3a20 6f66 660d 0a0d 0a              ed:.off....
> 16:37:02.145588 IP 127.0.0.1.81 > 127.0.0.1.38756: Flags [.], ack 376, win 350, options [nop,nop,TS val 66617043 ecr 66617043], length 0
>         0x0000:  4500 0034 692a 4000 4006 d397 7f00 0001  E..4i*@.@.......
>         0x0010:  7f00 0001 0051 9764 cc19 17f9 170d 87df  .....Q.d........
>         0x0020:  8010 015e fe28 0000 0101 080a 03f8 7ed3  ...^.(........~.
>         0x0030:  03f8 7ed3                                ..~.
> 16:37:02.240195 IP 127.0.0.1.81 > 127.0.0.1.38756: Flags [P.], seq 1:413, ack 376, win 350, options [nop,nop,TS val 66617052 ecr 66617043], length 412
>         0x0000:  4500 01d0 692b 4000 4006 d1fa 7f00 0001  E...i+@.@.......
>         0x0010:  7f00 0001 0051 9764 cc19 17f9 170d 87df  .....Q.d........
>         0x0020:  8018 015e ffc4 0000 0101 080a 03f8 7edc  ...^..........~.
>         0x0030:  03f8 7ed3 4854 5450 2f31 2e31 2032 3030  ..~.HTTP/1.1.200
>         0x0040:  204f 4b0d 0a53 6572 7665 723a 206e 6769  .OK..Server:.ngi
>         0x0050:  6e78 0d0a 4461 7465 3a20 5765 642c 2032  nx..Date:.Wed,.2
>         0x0060:  3020 4d61 7920 3230 3135 2031 353a 3337  0.May.2015.15:37
>         0x0070:  3a30 3220 474d 540d 0a43 6f6e 7465 6e74  :02.GMT..Content
>         0x0080:  2d54 7970 653a 2074 6578 742f 6874 6d6c  -Type:.text/html
>         0x0090:  3b20 6368 6172 7365 743d 7574 662d 380d  ;.charset=utf-8.
>         0x00a0:  0a43 6f6e 6e65 6374 696f 6e3a 206b 6565  .Connection:.kee
>         0x00b0:  702d 616c 6976 650d 0a56 6172 793a 2041  p-alive..Vary:.A
>         0x00c0:  6363 6570 742d 456e 636f 6469 6e67 0d0a  ccept-Encoding..
>         0x00d0:  4578 7069 7265 733a 2053 756e 2c20 3139  Expires:.Sun,.19
>         0x00e0:  204e 6f76 2031 3937 3820 3035 3a30 303a  .Nov.1978.05:00:
>         0x00f0:  3030 2047 4d54 0d0a 4361 6368 652d 436f  00.GMT..Cache-Co
>         0x0100:  6e74 726f 6c3a 206e 6f2d 6361 6368 652c  ntrol:.no-cache,
>         0x0110:  206d 7573 742d 7265 7661 6c69 6461 7465  .must-revalidate
>         0x0120:  2c20 706f 7374 2d63 6865 636b 3d30 2c20  ,.post-check=0,.
>         0x0130:  7072 652d 6368 6563 6b3d 300d 0a43 6f6e  pre-check=0..Con
>         0x0140:  7465 6e74 2d4c 616e 6775 6167 653a 2065  tent-Language:.e
>         0x0150:  6e0d 0a4c 696e 6b3a 203c 6874 7470 733a  n..Link:.<https:
>         0x0160:  2f2f 706c 616e 2d73 7461 6769 6e67 2e74  //plan-staging.t
>         0x0170:  6f72 6368 626f 7861 7070 732e 636f 6d2f  orchboxapps.com/
>         0x0180:  3e3b 2072 656c 3d22 6361 6e6f 6e69 6361  >;.rel="canonica
>         0x0190:  6c22 2c3c 6874 7470 733a 2f2f 706c 616e  l",<https://plan
>         0x01a0:  2d73 7461 6769 6e67 2e74 6f72 6368 626f  -staging.torchbo
>         0x01b0:  7861 7070 732e 636f 6d2f 3e3b 2072 656c  xapps.com/>;.rel
>         0x01c0:  3d22 7368 6f72 746c 696e 6b22 0d0a 0d0a  ="shortlink"....
> {noformat}
> There's something else going on though, because I couldn't reproduce this on a different server with a trivial test script:
> {noformat}
> by-web-4-a:/var/www/atstest.torchbox.com/htdocs# cat link.php
> <?php
> header('Cache-Control: no-cache');
> header('Link: <http://plan-staging.torchboxapps.com/>; rel="canonical", <http://plan-staging.torchboxapps.com/>; rel="shortlink"');
> {noformat}
> {noformat}
> <1 jobs> <exit 6> 155!klamath:~/tbx/puppet>curl -I https://atstest.torchbox.com/link.php
> HTTP/1.1 200 OK
> Date: Thu, 21 May 2015 10:08:32 GMT
> Content-Type: text/html; charset=UTF-8
> Vary: Accept-Encoding
> Cache-Control: no-cache
> Link: <http://plan-staging.torchboxapps.com/>; rel="canonical", <http://plan-staging.torchboxapps.com/>; rel="shortlink"
> Age: 0
> Connection: keep-alive
> Strict-Transport-Security: max-age=15552000
> Via: http/1.1 by-web-4-a (uScMsSf pSeN:t cCMi pSs )
> X-Cache: miss
> {noformat}



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