Skip to content

Conversation

@meeramn
Copy link
Contributor

@meeramn meeramn commented Jun 8, 2018

Handy tool developed in perl few years ago to easily decode via header.

@SolidWallOfCode
Copy link
Member

How is this different / better than cmd/traffic_via?

@zwoop zwoop added this to the 9.0.0 milestone Jun 10, 2018
zwoop
zwoop previously requested changes Jun 10, 2018
Copy link
Contributor

@zwoop zwoop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! One missing piece: Please add the ASF license blurb to the top of this file (right after the shebang). You can copy it from any of the other perl scripts in the git repository.

Also, it might be better to do e.g.

#!/usr/bin/env perl

for the shebang. Finally, there seems to be a number of empty lines at the bottom of the file, please remove those too :).

@zwoop
Copy link
Contributor

zwoop commented Jun 10, 2018

Once we land this, I'll take care of moving and replacing the existing cmd/traffic_server code.

@SolidWallOfCode @bryancall I'd like to get this in for 8.0.0 as well. I think it makes much more sense to have traffic_via as a simple script, that can be included in people working systems, and not necessarily tied to an ATS version / release.

If I recall, the C++ version also currently requires the mgmt port for it to function, which the perl script did not.

@SolidWallOfCode
Copy link
Member

OK.

@bryancall
Copy link
Contributor

bryancall commented Jun 11, 2018

Tested and I like the option to take stdin. It should be renamed to traffic_via once the C code is removed.

09:37:56 homer:/tmp$ curl -s -D - -o /dev/null http://s.yimg.com/ | ./via_decoder.pl
Via Header is [c s f ]
Via Header details:
Request headers received from client:                  unknown?
Result of Traffic Server cache lookup for URL:         unknown?
Response information received from origin server:      no server connection needed

@bryancall
Copy link
Contributor

[approve ci]

@bryancall
Copy link
Contributor

@meeramn Please squash the commits.

@mlibbey
Copy link
Contributor

mlibbey commented Aug 15, 2018

This is for #3809

@meeramn meeramn force-pushed the via_decoder_3809 branch 2 times, most recently from 79e488f to f99dbeb Compare August 29, 2018 06:29
@bryancall bryancall dismissed zwoop’s stale review August 31, 2018 16:52

code has been updated

@bryancall bryancall merged commit 5e4295c into apache:master Aug 31, 2018
@bryancall bryancall modified the milestones: 9.0.0, 8.0.0 Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants