Logo Search packages:      
Sourcecode: djvulibre version File versions

GUTF8String GURL::get_string ( const GUTF8String useragent  )  const

Returns a string representing the URL. This function normally returns a standard file URL as described in RFC 1738. Some versions of MSIE do not support this standard syntax. A brain damaged MSIE compatible syntax is generated when the optional argument useragent# contains string #"MSIE"# or #"Microsoft"#.

Definition at line 1184 of file GURL.cpp.

References expand_name(), is_local_file_url(), GBaseString::length(), GBaseString::search(), and UTF8Filename().

Referenced by base(), DjVuDocument::get_djvu_file(), GURL(), hash_argument(), DjVuFile::init(), DjVuDocEditor::init(), is_empty(), mkdir(), operator=(), operator==(), protocol(), DjVuDocument::request_data(), set_hash_argument(), DjVuDocument::start_init(), and DjVuImage::writeXML().

{
  if(!validurl)
    const_cast<GURL *>(this)->init();
  GUTF8String retval(url);
  if(is_local_file_url()&&useragent.length())
  {
    if(useragent.search("MSIE") >= 0 || useragent.search("Microsoft")>=0)
    {
      retval=filespecslashes + expand_name(UTF8Filename());
    }
  }
  return retval;
}


Generated by  Doxygen 1.6.0   Back to index