×

Discussion Board

Results 1 to 10 of 10

Hybrid View

  1. #1
    Registered User
    Join Date
    Mar 2008
    Posts
    47

    Download older versions of mobile web server

    Hi

    Is it possible to download older versions of the mobile web server from somewhere? I can only find version 1.4 at mymobilesite.net.

    I am faceing some problems getting a script that works perfectly on a N95 / MWS 1.2 to work on N95 8GB / MWS 1.4

    I would like to test is its the device MWS version or something else.

    best regards,
    Magnus

  2. #2
    Registered User
    Join Date
    Mar 2008
    Posts
    47

    Re: Download older versions of mobile web server

    Well I found what is causing my script not to work on the newest mobile web server.

    Nothing serious, actually a debug print out.

    I open a debug file with
    sys.stdout = open("c:\\debugfile.txt", "w")

    so the output of every print statement is written to this file

    then the web server crasses, sends out a zero sized reply, on the following line where I print out the incoming http headers

    print req.headers_in

    I can ofcourse just skip this in a final version, but this works on MWS 1.02(1) and 1.2

  3. #3
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    457

    Re: Download older versions of mobile web server

    If memory serves me, the Apache used in MWS up until 1.2 was built using the old c-library of Symbian, while the Apache used in MWS versions after that is built using the new Open-C library.

    I was about to blame Open-C, because there used to be bug (I believe it's been fixed in the latest release) that caused the application to crash when a file opened in binary mode was closed.

    However, as we are now talking PyS60, which still uses the old c-library in its implementation, the use of Open-C should not have any impact.

    Perhaps you still could try whether opening the file using text-mode changes anything.

    Br,
    Johan

  4. #4
    Registered User
    Join Date
    Mar 2008
    Posts
    47

    Re: Download older versions of mobile web server

    Hi,

    I can successfully open, write to the file and close it.

    It only crashes when I try to write out the incoming HTTP headers. So probably this is not the issue. Since this was just meant for debugging and logging, I just took out the line that writes out the incoming headers and then everything works (that is everything else gets written to the file and it is closed successfully).

    best regards,
    Magnus

  5. #5
    Nokia Developer Expert
    Join Date
    Mar 2003
    Posts
    457

    Re: Download older versions of mobile web server

    Quote Originally Posted by maggias View Post
    It only crashes when I try to write out the incoming HTTP headers. So probably this is not the issue. Since this was just meant for debugging and logging, I just took out the line that writes out the incoming headers and then everything works (that is everything else gets written to the file and it is closed successfully).
    If it's not too much work, could you please provide me with the smallest possible code snippet that causes a crash and I could investigate what really is going on.

    Johan

  6. #6
    Registered User
    Join Date
    Mar 2008
    Posts
    47

    Re: Download older versions of mobile web server

    Sure no problem, here are two test cases other that crashes and another that works.

    TEST 1:
    def handler(req):
    from mod_python import apache
    import sys

    sys.stdout = open(u'c:\\Data\\Web server\\htdocs\\test1\\result.txt', "w")

    #print something
    print "TEST1"

    #print headers
    print req.headers_in

    req.write("Done")

    sys.stdout.close()

    return apache.OK

    Returns a Zero sized reply, "Oops! the Mobile Web Server (Beta) you used faces a problem."

    The text file gets created but it is empty sys.stdout.flush() before #print headers would though have printed TEST1 into it.

    TEST 2:
    def handler(req):
    from mod_python import apache
    import sys

    sys.stdout = open(u'c:\\Data\\Web server\\htdocs\\test2\\result.txt', "w")

    #print something
    print "TEST2"

    #print headers
    #print req.headers_in

    req.write("Done")

    sys.stdout.close()

    return apache.OK

    Finishes successfully printing Done to the browser and creating the result file containing the string TEST2

    You can test both from my device if you like:
    https://maggi.mymobilesite.net/test1/.py
    https://maggi.mymobilesite.net/test2/.py

    Test 1 works on older version of the MWS then printing out a dict with the incoming HTTP headers.

    best regards,
    Magnus

Similar Threads

  1. Mobile web server and web services
    By landerluu in forum Mobile Web Server
    Replies: 1
    Last Post: 2008-01-03, 06:36
  2. problem connecting to mobile web server.
    By lb213_2000 in forum Symbian
    Replies: 0
    Last Post: 2007-11-14, 03:11
  3. Web To Mobile games a reality
    By sjbrown0 in forum Mobile Java General
    Replies: 0
    Last Post: 2005-06-29, 01:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×