]> git.saurik.com Git - wxWidgets.git/commitdiff
fix for [ 1060093 ] wxURI && wxStringBufferLength part 2 - query and fragment not...
authorRyan Norton <wxprojects@comcast.net>
Fri, 5 Nov 2004 08:50:30 +0000 (08:50 +0000)
committerRyan Norton <wxprojects@comcast.net>
Fri, 5 Nov 2004 08:50:30 +0000 (08:50 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/url.cpp

index fc8187bd3c7091a25b015782d95273a51a116c61..653d15d1876ccdeec8f24171440f9de331547623 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 != NULL)
+  {
+      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)
   {