Created
September 2, 2013 13:03
-
-
Save danielfone/6412631 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=ERROR REPORT==== 2-Sep-2013::12:55:32 === | |
Yaws process died: {{badrecord,headers}, | |
[{yaws,outh_serialize,0}, | |
{yaws_server,deliver_accumulated,4}, | |
{yaws_server,finish_up_dyn_file,2}, | |
{yaws_server,aloop,4}, | |
{yaws_server,acceptor0,2}, | |
{proc_lib,init_p_do_apply,3}]} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%% Advice partly taken from Apache's documentation of `mod_deflate'. | |
+has_ie("MSIE"++_) -> | |
+ true; | |
+has_ie(_) -> | |
+ false. | |
+ | |
%% Only Netscape 4.06-4.08 is really broken. | |
has_buggy_gzip("Mozilla/4.06"++_, _) -> | |
true; | |
@@ -1622,10 +1627,10 @@ outh_get_vary_fields() -> | |
outh_serialize() -> | |
H = get(outh), | |
- Code = case H#outh.status of | |
- undefined -> 200; | |
- Int -> Int | |
- end, | |
+ Code = case has_ie(H#headers.user_agent) of | |
+ true -> 500; | |
+ false -> 200 | |
+ end, | |
StatusLine = ["HTTP/1.1 ", erlang:integer_to_list(Code), " ", | |
yaws_api:code_to_phrase(Code), "\r\n"], | |
GC=get(gc), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment