Branch: Tag:

2004-04-21

2004-04-21 11:10:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Now looks at the destination header.

Rev: server/protocols/http.pike:1.433

2:   // Modified by Francesco Chemolli to add throttling capabilities.   // Copyright © 1996 - 2001, Roxen IS.    - constant cvs_version = "$Id: http.pike,v 1.432 2004/04/20 21:01:03 mast Exp $"; + constant cvs_version = "$Id: http.pike,v 1.433 2004/04/21 11:10:34 grubba Exp $";   // #define REQUEST_DEBUG   #define MAGIC_ERROR   
735:    misc->range = contents[6..];    break;    -  +     case "host":    case "connection":    misc[linename] = lower_case(contents);
743:    case "content-type":    misc[linename] = contents;    break; +  case "destination": +  misc["new-uri"] = contents; +  if (mixed err = catch { +  misc["new-uri"] = Standards.URI(contents)->path; +  }) { + #ifdef DEBUG +  report_debug(sprintf("Destination header contained a bad URI: %O\n" +  "%s", contents, describe_error(err))); + #endif /* DEBUG */    } -  +  break;    } -  +  }    TIMER_END(parse_got_2_parse_headers);    TIMER_START(parse_got_2_more_data);    if(misc->len)