Mike Goslin пре 25 година
родитељ
комит
2c5c39a35f
1 измењених фајлова са 7 додато и 0 уклоњено
  1. 7 0
      panda/src/downloader/downloader.cxx

+ 7 - 0
panda/src/downloader/downloader.cxx

@@ -830,6 +830,13 @@ parse_header(DownloadStatus *status) {
 
 
     // Two consecutive (CR LF)s indicates end of HTTP header
     // Two consecutive (CR LF)s indicates end of HTTP header
     if (nl == p) {
     if (nl == p) {
+      // Make sure we didn't get a redirect
+      if (redirect == true) {
+	downloader_cat.error()
+	  << "Downloader::parse_header() - Got a 302 redirect but no "
+	  << "Location directive" << endl;
+	return EU_error_abort;
+      }
       if (downloader_cat.is_debug())
       if (downloader_cat.is_debug())
         downloader_cat.debug()
         downloader_cat.debug()
           << "Downloader::parse_header() - Header is complete" << endl;
           << "Downloader::parse_header() - Header is complete" << endl;