Forum Moderators: phranque

Message Too Old, No Replies

empty vs. absent

         

lucy24

3:01 am on Nov 24, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



The good news: This question has not been asked 80 times in the past week.
The bad news: It's no use sitting back and waiting for Lucy24 to answer it.

Question: When using mod_setenvif, is there any way to distinguish between a header that's absent and a header that's empty? (I guess the same applies to mod_rewrite, but I'm currently in setenvif.)

Backstory: I found a blocked request from an IP range that I would never, ever block.* After poring over logs and headers, I found that the request had sent such-and-such header, as humans do-- but it was empty. Bad news, because the absence of this particular header is a strong robot marker. But I can't find any way to say "it's present but empty". (Weird corollary discovery: Seznam Preview also sends an empty header. Wonder if there's any way to find out why?)


* In fact I feel so strongly about it that I've now poked a vigorous hole for mod_setenvif, and will later see about doing the same for mod_rewrite.

not2easy

3:35 am on Nov 24, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Oh, great. Are there any characters that you would expect to 'always' be in the header?

lucy24

6:32 am on Nov 24, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It doesn't matter, because whether the header is absent or whether it's empty, any specified characters will obviously not be present :(

not2easy

7:05 am on Nov 24, 2014 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Of course - sorry, looks like I have my own empty header sometimes.