• Post Reply Bookmark Topic Watch Topic
  • New Topic

strange message at web-server  RSS feed

 
nikos sokaf
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi again,
I'm trying to develop a simple web server with POST and GET methods.
I made a form with a Submit button but when I'm trying to print the String sequence on server command line window i get this:
POST/--WEBBOT-SELF--/ etc.
What is "--WEBBOT-SELF-- at the message?
The code of index page that sends my server to client browser is:
<%@ Language=JavaScript %><html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Νέα σελίδα 1</title>
</head>
<body>
<form method="POST" enctype="multipart/form-data" action="--WEBBOT-SELF--">
<!--webbot bot="FileUpload" U-File="C:\Documents and Settings\nikos\Desktop\ggh\lkj\_private\form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><p>
<input type="file" name="F1" size="20"><input type="submit" value="Υποβολή" name="B1"><input type="reset" value="Επαναφορά" name="B2"></p>
</form>
<form method="POST" enctype="multipart/form-data" action="--WEBBOT-SELF--">
<!--webbot bot="FileUpload" S-Label-Fields="TRUE" U-File="c:\dd.txt" S-Format="TEXT/CSV" --><p>
<input type="file" name="F1" size="20"><input type="submit" value="Υποβολή" name="B1"><input type="reset" value="Επαναφορά" name="B2"></p>
</form>
</body>
</html>
I saw this message inside the code, but when I'm trying to change it, i fail?
Can anyone Knowswhat it is?
I'm new to web-services, so please give me a hint...
What should i write to transfer a value at the server, for example the value putted on a text field?
Thanks for your time!
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm, I had a good referenc eon header syntax but can't find it right now. In myown code, I expect the first header to be

You should be able to parse these out on blanks. URL can then be parsed as

Split first on the question mark to get the page name or form action, then a StringParser split on ampersand will get a bunch of name=value pairs. Split each one on equal sign.
The /--WebBot--/ value you found on the post header matches the action parameter of your HTML form. In a traditional web server that would be the name of a script of CGI or something that can handle the form fields. In your simple server it can be whatever you want it to be. In my wiki server I ignore it and use two hidden form fields to decide how to handle the inbound data.
Here are some other headers I recognize on GET or POST. I'm sure there are more! There should be a blank line after the last header.

Most parse as name:value but a few are more complex. The multipart one gets really interesting with file uploads!
Hope that helped!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!