From: Steve V. <vi...@ie...> - 2017-11-19 17:49:55
|
On Sun, Nov 19, 2017 at 11:29 AM, <er...@ca...> wrote: > It's version 2.0.4 - I pulled it from git last Tuesday. > > Unfortunately, the access log doesn't go back far enough so no info about > the original requests for the examples I gave. I'm keeping an eye on the > situation and I'll try to catch the next one. > OK, thanks. Meanwhile, I see that Klacke added the following code to yaws_server.erl, in a spot where there's path field handling, back in Feb 2008: https://github.com/klacke/yaws/blob/master/src/yaws_server.erl#L1929-L1932 As you can see, that code handles {scheme, ...} and a default underscore case. The {abs_path, ...} case is handled at line 1834. Unfortunately the commit message for this change doesn't provide any further clues, but he must have seen a case like yours where the path was getting set to {scheme, ...} or a value other than {abs_path, ...}. Perhaps your code should provide similar handling for these cases. --steve > On 2017-11-19 16:12, Steve Vinoski wrote: > >> >> >> On Sun, Nov 19, 2017 at 9:58 AM, <er...@ca... <mailto: >> er...@ca...>> wrote: >> >> I'm using a arg_rewrite_mod with: >> >> arg_rewrite(Arg) -> >> Req = Arg#arg.req, >> {abs_path,Path} = Req#http_request.path, >> >> and it's occasionally failing because the tuple being returned does >> not have the expected number of elements, e.g. 3 or 1 respectively: >> >> Yaws process died: {{badmatch,{scheme,"50.117.38.171","443"}}, >> >> Yaws process died: {{badmatch,"12.1.2"}, >> >> Is there a better way of extracting the Path? >> >> >> What version of Yaws is this? >> >> I consider it a Yaws bug if you're looking at the path field and getting >> a scheme instead, or getting "12.1.2". Do you have any associated logs that >> might indicate more information about the original requests for these two >> cases, or other similar cases? >> >> --steve >> >> >> ------------------------------------------------------------ >> ------------------ >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> _______________________________________________ >> Erlyaws-list mailing list >> Erl...@li... >> <mailto:Erl...@li...> >> https://lists.sourceforge.net/lists/listinfo/erlyaws-list >> <https://lists.sourceforge.net/lists/listinfo/erlyaws-list> >> >> >> |