×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    9

    Mobile Browser rendering of local files vs URL files with Wap Gateway Simulator

    Why is the result of rendering wml (as well as xhtml) pages different from local files and from network server files with the Nokia Mobile Browser 4.0 when using the Nokia WAP Gateway Simulator 4.0? How to configure the system so that I can use also the URL addresses?

    When I access the file locally (Mobile Browser Menu -> File -> Open File...) it is rendered ok in the Browser. However, if I copy the same file to a URL in a network server (Apache AdvancedExtranetServer 1.3.27) and access it (Mobile Browser Menu -> File -> Load URL...) the browser displays the source code of the page instead. The source code is the same as the original except that some indent spaces are removed.

    The Mobile Browser Diagnostics / Traffic shows that with URL access the Content Data is 785 bytes long and interpreted to be of type 'application/vnd.wap.wmlc; ISO-8859-1' where as with local file access the Content Data is 698 bytes long and the type 'text/vnd.wap.wml;UTF-8'. With Ethereal line sniffer I can see that actually the Apache server set the content length to 785 and the Content-Type HTTP header to 'text/plain, charset=ISO8859-1\r\n'.

    The Wap Gateway Simulator Access log:
    WSP_Transaction=2;
    ackstatus=4;
    userid=0;
    authtype=0;
    client=127.0.0.1:1057;
    server=UDP:9200;
    sec=0;
    method=GET;
    url=http://192.168.0.1/S/testwml.wml;
    reqsize=573+0;
    httpstatus=200;
    wspstatus=32;
    respsize=202+698;
    servicedata="";
    processtime=0+0+321+60+0+581=962

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    11
    My guess is, that you have some non-ascii content in the file and that's causing the problem. Try to configure your gateway to send the content specifying the character set to be UTF-8. One way to do it is to modify the first line of the file to look like this: "<?xml version="1.0" encoding="utf-8"?>". If that doesn't work add this header to the list of custom headers in the device settings dialog:
    accept-charset: utf-8

    If this doesn't work, just copy the actual content to this forum, so we can check it out.

    Good luck!

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    9

    Specifying the mime type and charset at the server helped

    tomci, thanks.

    Based on your answer I managed to solve the problem.

    I made following chances to the Apache configuration in my Linux server:

    In to file /etc/httpd/conf/apache-mime.types I added lines:
    text/vnd.wap.wml wml
    application/xhtml+xml xhtml

    In to the directory (/var/www/html) where I had the content for browsing I added a file .htaccess and there I put a line:
    AddCharset UTF-8 .wml .xhtml

    Thanks again.

Posting Permissions

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