Validating HTTP Response ETag?
by Turbocapitalist from LinuxQuestions.org on (#6NJ9H)
How does one validate the HTTP response header ETag.
In RFC 7232, it says that it will be a quoted string or a quoted string preceded by W/ but does not say how long that string can be. I'm not sure either what characters can be in the string. How to find that out?
In short, what can be done to validate an ETag?
Edit: I'm thinking the set is something like this:
Code:perl -e 'my @etagc = map( chr, 0x21, 0x23 .. 0x7e, 0x80.. 0xff) ;
print join(" ",@etagc),"\n";'But that still leave how long is the maximum length of an ETag header.
In RFC 7232, it says that it will be a quoted string or a quoted string preceded by W/ but does not say how long that string can be. I'm not sure either what characters can be in the string. How to find that out?
In short, what can be done to validate an ETag?
Edit: I'm thinking the set is something like this:
Code:perl -e 'my @etagc = map( chr, 0x21, 0x23 .. 0x7e, 0x80.. 0xff) ;
print join(" ",@etagc),"\n";'But that still leave how long is the maximum length of an ETag header.