Questions tagged [httpserver]

An HTTP Server is any application which receives requests via the HTTP protocol and sends back the corresponding response to fulfill the request.

An HTTP Server is any application which receives requests via the HTTP protocol and sends back the corresponding response to fulfill the request. This is the main method used by websites to handle HTML pages, Stylesheets, Scripts, Images, and other various types of files and requests which a web page may request from the server. HTTP Servers also handle other attributes of such a request, such as Query Strings and Cookies.

1287 questions
31
votes
5 answers

How to obtain the query string in a GET with Java HttpServer/HttpExchange?

I am trying to create a simple HttpServer in Java to handle GET requests, but when I try to get the GET parameters for a request I noticed the HttpExchange class does not have a method for that. Does anybody know an easy way to read the GET…
Tibor
  • 651
  • 1
  • 8
  • 18
30
votes
3 answers

Get request body from node.js's http.IncomingMessage

I'm trying to implement a simple HTTP endpoint for an application written in node.js. I've created the HTTP server, but now I'm stuck on reading the request content body: http.createServer(function(r, s) { console.log(r.method, r.url,…
lorenzo-s
  • 16,603
  • 15
  • 54
  • 86
28
votes
1 answer

How do I map incoming "path" requests when using HTTPServer?

I'm fairly new to coding in python. I created a local web server that says "Hello World" and displays the current time. Is there a way to create a path, without creating a file, on the server program so that when I type in "/time" after 127.0.0.1…
nunurao
  • 311
  • 1
  • 3
  • 6
27
votes
5 answers

Python Desktop Application with the Browser as an interface?

I want to create an application that runs on the users computer, a stand-alone application, with installation and what-not, but I want the interface to be a browser, either internal and displayed as an OS window or external accessible using the…
Eli
  • 2,666
  • 7
  • 33
  • 37
26
votes
8 answers

node http-server to respond with index.html to any request

I have installed http-server globally. I launch it from myDir on localhost port 8080. In myDir I have index.html. If I request (from the browser) http://localhost:8080/ I get index.html, which is OK. If I request though…
Picci
  • 16,775
  • 13
  • 70
  • 113
24
votes
1 answer

.htaccess : Location not allowed here

I am getting a "Location not allowed here" error with this .htaccess. Does anyone have any idea on how I should fix this? AuthName NTLM AuthType NTLM NTLMAuth on NTLMAuthoritative on NTLMServer
Pedro Rolo
  • 28,273
  • 12
  • 60
  • 94
22
votes
2 answers

node http-server not serving updated html files

I am building out a front-end web app with angular (mostly ui-router) and doing local development by serving the html files through node http-server. I have noticed that http-server isn't serving my static html files when I make updates, which is…
wariofan1
  • 481
  • 2
  • 4
  • 17
22
votes
5 answers

Local server not reflecting updated files

I'm fairly new at user local servers. I'm using the http-server which is a package from Node. I'm using it to host an HTML5 game using the Phaser library. I have image assets I'm using in the game, and I sometimes update these assets. When I do, the…
Jake Moritz
  • 843
  • 2
  • 9
  • 21
21
votes
4 answers

go: http server does not work on osx

The example http server doesn't work for me. Source code: package main import ( "fmt" "net/http" ) func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hi there, I love %s!", r.URL.Path[1:]) } func main() { …
mabn
  • 2,473
  • 1
  • 26
  • 47
21
votes
3 answers

Mysterious exceptions when making many concurrent requests from urllib.request to HTTPServer

I am trying to do this Matasano crypto challenge that involves doing a timing attack against a server with an artificially slowed-down string comparison function. It says to use "the web framework of your choosing", but I didn't feel like installing…
Elias Zamaria
  • 96,623
  • 33
  • 114
  • 148
21
votes
4 answers

Running NodeJs http-server forever with PM2

My question is about running HTTP-server in combination with PM2. The problem I face is that: HTTP-server requires as input a folder which is the root of the website and a port number to run the website on. PM2 doesn't recognize the HTTP-server…
Guy Hagemans
  • 496
  • 1
  • 4
  • 15
21
votes
3 answers

Restart Go's net/http server on file-change like Django

I'm trying out Martini, which adds some nice functionality upon Go's basic net/http package. I was wondering tho. How can I, like Django does too, let the server restart itself on source-file changes? I know how to monitor a file, but I'm not sure…
user1467267
21
votes
2 answers

Embedded vs Stand alone Tomcat ( HTTP ) server

I am working on a new project which would be a web application with a front end UI and a back end web service. I started looking into what servers to use like Tomcat / Jetty and so .. I also noticed that there is an embedded version of these HTTP…
broun
  • 2,483
  • 5
  • 40
  • 55
21
votes
9 answers

nginx: [emerg] unknown directive " " in /etc/nginx/sites-enabled/example.com:3

I have followed this website http://raspberrypihelp.net/tutorials/24-raspberry-pi-webserver to setup the HTTP server nginx on my Raspberry Pi and try to setup a site call example.com. But when I run sudo service nginx restart, it said Restarting…
Confucius
  • 419
  • 3
  • 7
  • 14
19
votes
3 answers

Error when serving npm http-server through terminal. (Error 404)

I have been trying to run a local http server for my HTML files after figuring out that the problem I was having with ng-view is that chrome does not support cross origin requests due to security reasons. Hence, I downloaded the npm http-server and…
Kevin Choi
  • 193
  • 1
  • 1
  • 6
1
2
3
85 86