Web Server HTTP response header for WAP (gateway?)

Web Server HTTP response header for WAP (gateway?) SearchSearch
Author Message
Si
Unregistered guest
Posted on Saturday, April 03, 2004 - 08:29 am:   

Hi, i am trying to create my own web server using Borland C++ Builder. what i do is have a socket connection that listens for any network connections on port 80 (HTTP). this works fine with HTML, whenever someone types in the computers IP address from a web browser as a URL, i have a label that shows an HTTP GET request, with the rest od the header.

from here i use a series of String methods (substring etc) to get the right URL info, then create a stringf called response, and sent the text to the socket. this works 100%. however i am trying to intergrate this server into a WAP server within the program environemt.

when, on my ohone, i type the computers IP adress, i can acess the GET header on port 80, but using the method i did for HTML pages, it doesnt connect back to the phone.

the header that is received is a lot more info than an HTML/HTTP request:

GET / HTTP/1.1
x-up-uplink: vcs-fmagdisp315.london.02.net
x-up-fax-limit: 0
Profile: http://wap.sonyericsson.com/UAprof/T68R502.xml
x-up-subno: MMS-31364758_vcs-fmagdisp315.london.02.net
x-up-fax-accepts: none
host: 217.42.175.155:80
Proxy-Authorization: Basic bzJ3YXA6cGFzc3dvcmQ=
Accept-Language: en
User-Agent: SonyEricssonT68/R502 UP.Link/5.1.1a
x-up-devcap-max-pdu: 10000
Accept-Application: 1
Accept-Application: 2
x-up-devcap-charset: us-ascii, iso-8859-1, utf-8, iso-10646-ucs-2
X-Forwarded-For: 10.6.28.3
x-up-WTLS-info: off
Connection: close
Encoding-Version: 1.3
x-up-wappush-secure: bengal-fmagpap310.london.02.net:9003/pap
Accept: application/vnd.wap.wmlc, application/vnd.wap.wbxml, application/vnd.wap.wmlscriptc, application/xhtml+xml, application/vnd.wap.xhtml+xml, application/vnd.wap.mms-message, text/css, */*, application/vnd.wap.sic,application/vnd.wap.mms-message, text/x-wap.wml,text/vnd.wap.wml,text/x-hdml,text/vnd.wap.wmlscript,text/vnd.wap. si, */*
x-up-wappush-unsecure: bengal-fmagpap310.london.02.net:9002/pap
Bearer-Indication: 0
Accept-Charset: us-ascii, iso-8859-1, utf-8, iso-10646-ucs-2, UTF-8, *

could anyone give me any information as to the details of the header. how would i write a response to this? i am sending text back to the socket - this works fine without any response header for the HTML.

many thanks,

Si
Anonymous
 
Posted on Thursday, September 15, 2005 - 08:44 pm:   

Hi,
I am also trying to send response to a WAP client on my socket. I need to send some text data. some how the client is closing the connection. the problem I am facing is exactly same as you. Could you pls let me know how you were able to solve this problem ? I am wrting the server on Linux machine.

I really appreciate your help.

Thanks
Poorna