473,614 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to view the header that ones client / browser generates?

Hi group,
I'm doing an internetclient via cellphone/gprs that sends a request to html
sites.
The client I've made work great on all sites......exce pt the only site where
I need it :-/

I guess that the problem is that my website host have a firewall, or maybe
just some serversettings, that inhibits my client from getting the site I
request.

What I now need to do is following
Checkking the header that my clientapplicati on generates, to see how it
differes from headers generated by normal clients, such as inet explorer and
so on.

Are there any site I can request, and see the header I requested with? A
mailback service would be the best, as I receive the response as a
textstream.

Thanks in advance
Adrian
Jul 17 '05 #1
4 1695
"Adrian Hjelmslund" <Ne**@hjelmslun d.dk> wrote in message
news:rb******** **********@news .get2net.dk...
Hi group,
I'm doing an internetclient via cellphone/gprs that sends a request to html sites.
The client I've made work great on all sites......exce pt the only site where I need it :-/

I guess that the problem is that my website host have a firewall, or maybe
just some serversettings, that inhibits my client from getting the site I
request.

What I now need to do is following
Checkking the header that my clientapplicati on generates, to see how it
differes from headers generated by normal clients, such as inet explorer and so on.

Are there any site I can request, and see the header I requested with? A
mailback service would be the best, as I receive the response as a
textstream.

Thanks in advance
Adrian


Why not write a simple socket server that will print everything it gets,
byte for byte, to System.out or a file? It takes maybe 30 lines of code.
I've probably got one lying around somewhere.
Jul 17 '05 #2
> Why not write a simple socket server that will print everything it gets,
byte for byte, to System.out or a file? It takes maybe 30 lines of code.
I've probably got one lying around somewhere.


Oh, a misunderstandin g here :o)
I'm generating the client request (I have no control over the header I send
though) and I need to see the header of my own request that I send to the
server. I have no access to the server unfortunately :-(
Best regards
Adrian
Jul 17 '05 #3
"Adrian Hjelmslund" <Ne**@hjelmslun d.dk> wrote in message
news:tM******** **********@news .get2net.dk...
Why not write a simple socket server that will print everything it gets,
byte for byte, to System.out or a file? It takes maybe 30 lines of code.
I've probably got one lying around somewhere.
Oh, a misunderstandin g here :o)
I'm generating the client request (I have no control over the header I

send though) and I need to see the header of my own request that I send to the
server. I have no access to the server unfortunately :-(
Best regards
Adrian

No, that's what I mean. Write a simple server, and tell your client to
connect to that server, and basically the server will just echo everything
it gets from the client so you can examine it. Something like:

import java.net.*;
import java.io.*;

public class EchoServer {

private int port = 8081;

public EchoServer() {
try {
ServerSocket serverSocket = new ServerSocket(po rt);
Socket client = serverSocket.ac cept();
InputStream in = client.getInput Stream();
int data;
while ((data = in.read()) != -1) {
System.out.prin t((char) data);
}
} catch (Exception e) {
e.printStackTra ce();
}
System.out.prin tln("---------------- Done");
}

public static void main(String[] args) {
EchoServer es = new EchoServer();
}
}

Understand that I just jotted that down on the spot, no references or
anything, so I can guarantee it will work. It's the general idea though.
Then just run this, and take your client and point it at
http://localhost:8081 (If that port is taken, just change it in the
program.)
Jul 17 '05 #4
Thanks Ryan,
Was just what I needed :-)
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2321
by: mike | last post by:
ok here's the problem: I have a page that displays a form for user to select individual fields and to specify their own criteria which is used to query a database and then create an excel spreadsheet and download it to their PC. when the user clicks on the "create a custom query" link on the reports page the file customss.php displays the form that list the various fields and criteria to specify for the search. This part
18
2847
by: chris | last post by:
I'd like to initiate a php script using a standard httpd request, but then allow the client browser to disconnect without terminating the script. Freeing up the browser to access other functions on the site. Whilst a combination of connection_timeout() and ignore_user_abort() can stop the script from terminating when the client calls termination, i'd like to terminate the clients connection rather than having to wait for the client to...
4
5233
by: MacDermott | last post by:
I have an Access 2000 form with a subform in Datasheet view. When I click on an item in the header of the subform (the title at the top of one of the columns), I'd like to be able to capture the fact that I'm clicking in the header and not somewhere in the detail section. How can I learn this? TIA - Turtle
0
3927
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen. It is almost like it is trying to implement it's own COM interfaces... below is the header, and a link to the dll+code: Zip file with header, example, and DLL:...
3
1582
by: Guadala Harry | last post by:
Is it possible to view the contents of an external CSS style sheet that is referenced from any web page being viewed in the browser (IE6)? If so how? The css file physically lives on the server, however, it must be sent down to the browser so that the browser knows what rules to apply to the linked HTML. Just wondering how to view and/or retrieve the css on the client side. How about the same question - but for JavaScript (.js) file...
5
15018
by: samuelberthelot | last post by:
Hi, I get this exception when I use a themed css file. In my web.config file I have: <pages theme="dRise"> and the trouble page is a master page : <% Response.Write(Header)%> <form id="form1" runat="server"> <div class="FormContent">
4
4882
by: Mark | last post by:
Can anyone tell me how i can prevent that users can see my connection string to mysql database? Using my browser i could easely use the function: view source.....showing the html/php code. IF the file includes the connection string than anyone could see my database name and password..... How can i prevent this??
4
6970
by: ingibjark | last post by:
Hello all I’m securing a web service using WSE 2.0. One of the potential client’s of the web service is a Java client using Sun JWSDP 1.5. The problem is that the java client gets the error “Server did not recognize the value of HTTP Header SOAPAction:”, and when I look at the trace the error is: WSE841: An error occured processing an outgoing fault response. ---> System.Web.Services.Protocols.SoapHeaderException: Header...
6
3979
by: Joseph Geretz | last post by:
I have the following class which I am serializing and passing back and forth between my Web Service application and the client. public class Token : SoapHeader { public string SID; public string UID; public string PWD; }
0
8197
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8142
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8443
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7114
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6093
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5548
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4136
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.