05-23-2011
Unit tests for HTTP server implementation
Anybody know of a suite of server-validation tests? I am trying to build my own HTTP server, but do not know of all the status code responses (like "200 OK") or the internal methods (like "keep-alive") which should be implemented to be considered a "complete" solution.
Any help?
6 More Discussions You Might Find Interesting
1. Cybersecurity
The other day, a friend of mine had his Linux webserver compromised because he was running a vulnerable PHP-script. The "hacker" had used a malformed URL to include a wget-command to fetch some stuff off the net and install it in /dev/shm where it ran undetected. Fortunately, the webserver ran as a... (2 Replies)
Discussion started by: indo1144
2 Replies
2. Linux
Hello all,
Please tell me that how to configure a HTTP server in Fedora Core 3
Also tell me about WEB HOSTING under Linux. (4 Replies)
Discussion started by: jaibw
4 Replies
3. Solaris
Hi,
i am trying to install Oracle 10g Companion Products on a Solaris 5.9 server.
At the end of the installation the configuration assistant fails and it's unable to start the HTTP Server.
Below is the error
opmnctl: starting opmn and all managed processes...
Failed to get IP for ... (0 Replies)
Discussion started by: saharookiedba
0 Replies
4. Shell Programming and Scripting
Hi,
Not sure if this post belongs to this forum but I have been trying every so often to setup a simple http server in awk. After a couple of try and errors I finally came across this:
REMCONF - TCP/IP Internetworking With `gawk'
This tutorial is not to cut and paste without change, so here... (0 Replies)
Discussion started by: ripat
0 Replies
5. UNIX for Advanced & Expert Users
How unix file can be put in the hash table and how to write a program in which the chunk server acts as a client and server .
Can you give me a comprehensive idea of implementation. (0 Replies)
Discussion started by: kswapnadevi
0 Replies
6. UNIX and Linux Applications
Hello everyone
I wanted to asked you guys for advice regarding the requirement to have Open LDAP Server in organization.
I installed Open LDAP Server, and also Client machine for testing before I put into production.
Everything works fine, along with a friendly web interface, him I add user... (1 Reply)
Discussion started by: James Stone
1 Replies
LEARN ABOUT DEBIAN
ns_connflushheaders
Ns_ConnQueueHeaders(3aolserver) AOLserver Library Procedures Ns_ConnQueueHeaders(3aolserver)
__________________________________________________________________________________________________________________________________________________
NAME
Ns_ConnQueueHeaders, Ns_ConnFlushHeaders - Routines to construct send HTTP response headers
SYNOPSIS
#include "ns.h"
void
Ns_ConnFlushHeaders(conn, status)
void
Ns_ConnQueueHeaders(conn, status)
ARGUMENTS
Ns_Conn conn (in) Pointer to open connection.
int status (in) HTTP response status.
_________________________________________________________________
DESCRIPTION
These function format headers pending in the outputheaders Ns_Set 0fRtto indicatenendsofoheaders.ture to be sent to the client. The head-
ers d0fR separators betweeneheaderTkey:evalueepairs andhattrailing status code (e.g., "HTTP/1.1 200 OK") is formatted as a single string
with
int Ns_ConnFlushHeaders(conn)
This routine constructs the headers and then attempts to send them immediately to the client. The result is either NS_OK if the
content was sent, NS_ERROR otherwise.
void Ns_ConnQueueHeaders(conn)
This routine constructs the headers as with Ns_ConnFlushHeaders but does not send the data to the client. Instead, the resulting
headers string is stored in an internal buffer to be sent later on the first call to Ns_ConnSend. Delaying the flush of the content
helps increase performance by providing the opportunity to combine the headers and content responses into a single system call.
Note that higher level routines which generate complete responses such as the Ns_ConnReturn routines or Ns_ConnFlush call Ns_ConnQueueHead-
ers automatically as needed. Only custom code which constructs headers manually and sends content directly must include a call to Ns_Con-
nQueueHeaders or Ns_ConnFlushHeaders before generating the output content.
EXAMPLES
The following example demonstrates a simple response. In this case, the headers are queued and sent with the small "hello" message on the
call to Ns_ConnPuts which internally calls Ns_ConnSend:
Ns_ConnSetRequiredHeaders(conn, "text/plain", 5);
Ns_ConnQueueHeaders(conn, 200);
Ns_ConnPuts(conn, "hello");
SEE ALSO
Ns_ConnSetHeaders(3), Ns_ConnSend(3)
KEYWORDS
connection, headers
AOLserver 4.0 Ns_ConnQueueHeaders(3aolserver)