In WebCore/loader/SubresourceLoader.cpp line 84, the following line is there else if (!request.httpReferrer()) But since request.httpReferrer returns a String object, the ! operator will interpreted unintentionally, the correct fix shall be: else if (request.httpReferrer().isEmpty())
Does this affect observable behavior? Would you be willing to submit a patch, as described in <http://webkit.org/coding/contributing.html>?
seems it's not changing observable behavior. I'll submit a patch soon within 2 weeks since will be off next week.
I'm actually not sure if there is anything to fix here. Using operator! with String used to convert to NSString* on Mac, but now we have this: inline bool operator!(const String& str) { return str.isNull(); } And it was added precisely to fix referrer sending: <http://trac.webkit.org/changeset/18577>.
I see your point, I should have checked it more carefully. Thanks. I think I need to go back and verify whether the httpReferer will return an empty or plain NULL string.
The current code is working as intended. No bug here.