]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/url.cpp
wxTextOutputStream::PutChar and text stream test
[wxWidgets.git] / src / common / url.cpp
index fc8187bd3c7091a25b015782d95273a51a116c61..2c30bffffcc3964e23b67718fa1ae3b2802bdc86 100644 (file)
@@ -285,9 +285,24 @@ wxInputStream *wxURL::GetInputStream()
 #endif
 
   // When we use a proxy, we have to pass the whole URL to it.
-  wxInputStream *the_i_stream =
-       (m_useProxy) ? m_protocol->GetInputStream(m_url) :
-                      m_protocol->GetInputStream(m_path);
+  wxInputStream *the_i_stream;
+  
+  if (!m_useProxy)
+  {
+      the_i_stream = m_protocol->GetInputStream(m_url);
+  }
+  else
+  {
+      wxString fullPath = m_path;
+
+      if (HasQuery())
+          fullPath += wxT("?") + m_query;
+      
+      if (HasFragment())
+          fullPath += wxT("#") + m_fragment;
+      
+      the_i_stream = m_protocol->GetInputStream(fullPath);
+  }
 
   if (!the_i_stream)
   {