Author: ruschein
Date: 2011-09-21 16:29:49 -0700 (Wed, 21 Sep 2011)
New Revision: 26920

Modified:
   csplugins/trunk/ucsd/ruschein/GSFS/progs/FetchPage.cc
Log:
Updated to display HTTP exchange with GS server on stderr.

Modified: csplugins/trunk/ucsd/ruschein/GSFS/progs/FetchPage.cc
===================================================================
--- csplugins/trunk/ucsd/ruschein/GSFS/progs/FetchPage.cc       2011-09-21 
23:29:03 UTC (rev 26919)
+++ csplugins/trunk/ucsd/ruschein/GSFS/progs/FetchPage.cc       2011-09-21 
23:29:49 UTC (rev 26920)
@@ -4,16 +4,22 @@
 
 
 void PrintUsage() {
-       std::cerr << "usage: " << MsgUtil::GetProgName() << " url\n";
+       std::cerr << "usage: " << MsgUtil::GetProgName() << " url [http_header1 
http_header2 ... http_headerN]\n";
 }
 
 
 int main(int argc, char *argv[]) {
-       if (argc != 2)
+       if (argc < 2)
                PrintUsage();
 
        try {
-               Downloader downloader(argv[1]);
+               Downloader::setDebugMode(true);
+               SList<std::string> http_headers;
+               for (int i = 2; i < argc; ++i)
+                       http_headers.push_back(std::string(argv[i]));
+
+               Downloader downloader(Url(argv[1]), http_headers);
+               std::cerr << "Header: " << downloader.getMessageHeader() << 
'\n';
                if (downloader.anErrorOccurred())
                        std::cerr << downloader.getLastErrorMessage() << '\n';
                else

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to