Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

X-Requested-With/HTTP_X_REQUESTED_WITH weird problem

By: a guest on Feb 26th, 2012  |  syntax: None  |  size: 0.50 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if 'X-Requested-With' in request.META:
  2.     request.META['HTTP_X_REQUESTED_WITH'] = request.META['X-Requested-With']
  3.        
  4. case 'X':
  5.     if (header_equals ("X-Forwarded-For", header_x_forwarded_for, begin, header_len)) {
  6.         ret = add_known_header (hdr, header_x_forwarded_for, val_offs, val_len);
  7.     } else if (header_equals ("X-Forwarded-Host", header_x_forwarded_host, begin, header_len)) {
  8.         ret = add_known_header (hdr, header_x_forwarded_host, val_offs, val_len);
  9.     } else
  10.         goto unknown;
  11.     break;