Results 1 to 14 of 14

Thread: QHttp get unparsed php file from WebDav! and same file firefox parse Ok.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Angry QHttp get unparsed php file from WebDav! and same file firefox parse Ok.

    I have on server a alias dir called /webdav and other real dir called /setting Password protect from ldapserver alias webdav is password protected on same ldap...

    a request to /setting/index.php?lastupdate=1414141414 (unixtime) from firefox parse this file ....

    the same request from qt QHttp download the plain text index.php and not the attached sqldump ??? why???

    I have spend much time & money to make the Http request with qt in place of libcurl and now the same QHttp give me a big invoice


    QHttp download this file as text! firefox no! (get the file sql ...)
    Qt Code:
    1. <?php
    2. header("Content-Type: text/plain");
    3. header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
    4. header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Datum in der Vergangenheit
    5. if(!defined('DIR_SEP')) {
    6. define('DIR_SEP', DIRECTORY_SEPARATOR);
    7. }
    8. print(file_get_contents(dirname(__FILE__).DIR_SEP."CURRENT_OBJEKT_3.sql"));
    9. /* .... update command on server ..... */
    10. ?>
    To copy to clipboard, switch view to plain text mode 


    my qt friend.... action
    full file http://ciz.ch/svnciz/_STATIC_LIBS_QT...k/gui_wget.cpp
    Qt Code:
    1. http = new QHttp(this);
    2. stopButton->setEnabled(true);
    3. http->setHost(urls.host(),80);
    4. http->setUser( current_user , current_pass );
    To copy to clipboard, switch view to plain text mode 

    apache 2 setting only webdaw dir ForceType text/plain
    Qt Code:
    1. Alias /webdav/ /home/webdav/angry/
    2. <Location /webdav>
    3. DirectoryIndex webdavnone.html
    4. AuthType Basic
    5. AuthLDAPAuthoritative On
    6. AuthName "Explorer"
    7. AuthLDAPURL ldap://195.90.211.54:389/ou=webdav,dc=box,dc=ciz,dc=ch?uid?sub
    8. require valid-user
    9. DAV On
    10. ### to show php as text on browser ####
    11. ForceType text/plain
    12. SetEnv redirect-carefully
    13. <Limit PUT POST DELETE PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK>
    14. require user angry
    15. </Limit>
    16. </Location>
    To copy to clipboard, switch view to plain text mode 
    Last edited by patrik08; 20th June 2006 at 20:32.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.