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
13
votes
1 answer

Python - BaseHTTPServer.HTTPServer Concurrency & Threading

Is there a way to make BaseHTTPServer.HTTPServer be multi-threaded like SocketServer.ThreadingTCPServer?
Ian
  • 24,116
  • 22
  • 58
  • 96
12
votes
4 answers

How do I serve index.html by default in my http-server

I have created a basic AngularJS app in node environment. I am using http-server module for serving the files to browser. Everything is working fine except for the fact that I can't get to serve index.html by default when the server launches. I…
Saurabh Tiwari
  • 4,632
  • 9
  • 42
  • 82
12
votes
2 answers

SimpleHTTPServer launched as a thread: does not daemonize

I would like to launch a SimpleHTTPServer in a separate thread, while doing something else (here, time.sleep(100)) in the main one. Here is a simplified sample of my code: from SimpleHTTPServer import SimpleHTTPRequestHandler from BaseHTTPServer…
philippe
  • 2,949
  • 4
  • 20
  • 34
12
votes
1 answer

HTTP/1.1 response to multiple range

While writing my HTTP/1.1 server, I get stuck dealing multiple ranges request. Section 14.35.1 of RFC 2616 refers some examples but doesn't clarify server behaviour. For instance: GET /some/resource HTTP/1.1 ... Range:…
LS_ᴅᴇᴠ
  • 10,823
  • 1
  • 23
  • 46
12
votes
3 answers

How to serve any file type with Python's BaseHTTPRequestHandler

Consider the following example: import string,cgi,time from os import curdir, sep from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer class MyHandler(BaseHTTPRequestHandler): def do_GET(self): try: if…
carrier
  • 32,209
  • 23
  • 76
  • 99
11
votes
7 answers

node js listen EADDRINUSE error for simple httpserver

I have simple node js http server. var http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World"); response.end(); }).listen(8888); If I…
hrishikeshp19
  • 8,838
  • 26
  • 78
  • 141
11
votes
4 answers

Angular2 "No provider for t!" and Uncaught (in promise): Error: DI Error

I've build a app in Angular 2, and have encountered a issue. I have used angular CLI to create my application, I have created my components and services using Angular CLI and I use "ng serve" to run the application locally and everything works fine.…
Prasanna J
  • 195
  • 1
  • 3
  • 7
11
votes
1 answer

How to embed an Http server (like i-Jetty, Paw, etc) in android application

How can I integrate an HTTP server (like iJetty, Paw, etc) in my Android application? I can't find any useful tutorial on the Internet. Most of the websites (including the official ones) just provide the server specification and downloadable server…
Vinit Shandilya
  • 1,643
  • 5
  • 24
  • 44
11
votes
2 answers

Can I make a Java HttpServer threaded/process requests in parallel?

I have built a simple HttpServer following tutorials i have found online, using Sun's lightweight HttpServer. Basically the main function looks like this: public static void main(String[] args) throws Exception { HttpServer server =…
Humunculus84
  • 163
  • 2
  • 2
  • 7
10
votes
4 answers

Objective-C: What does [ClassName self]; do?

I'm looking through the source code for the CocoaHTTPServer project, more specifically the HTTPServer.m file and I just don't understand this line: connectionClass = [HTTPConnection self]; What does this do (is it documented anywhere)? How does it…
jbat100
  • 16,757
  • 4
  • 45
  • 70
10
votes
1 answer

Setting up simple SAFE http server in Python3

I want to set up very simple http server whith replaces few keywords in single html file and send it in repspond to request to clients. Python's http.server looks good for me but in documentation I found: Warning http.server is not recommended for…
domino_pl
  • 163
  • 1
  • 1
  • 7
10
votes
2 answers

Angular 5 fix relative path for Assets/ folder

I am working on an Angular 5 app, I am hosting it on a Apache2.4 http server redirecting it with a proxy module on http://localhost:7777/test/ My first issue was when calling a service from the browser, it was using http://localhost:7777/ as base…
Logan Wlv
  • 3,274
  • 5
  • 32
  • 54
10
votes
3 answers

Is TIdHTTPServer Compatible with Microsoft BITS

We are trying to write an update server for our software using the TIdHTTPServer component. Currently we are serving an XML file that lists the available updates and their file versions etc.., when the client program finds a updated version it…
Mike Taylor
  • 2,376
  • 2
  • 17
  • 33
10
votes
4 answers

Java httpServer basic authentication for different request methods

I'm using a very simple httpServer in Java for an api rest with GET, POST, PUT and DELETE. I'm using Basic Authentication and I have a couple classes Authentication.java and Authorisation.java which I use to authenticate and check permissions for…
David
  • 3,364
  • 10
  • 41
  • 84
10
votes
2 answers

How many clients can an http-server handle?

I built a web application with Angular2 as client and NodeJS as server. I want to serve it with npm's http-server application without any configuration but I wonder how many clients it can handle simultaneously?
Bünyamin Sarıgül
  • 3,031
  • 4
  • 30
  • 55