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

Flask - How to make an app externally visible through a router?

The question in short How do you run a simple Flask-based website visible to the internet, from a host PC which is accessing the internet from a wireless router? Question details I would like to make a flask application visible to the internet, as…
Pythonic
  • 2,091
  • 3
  • 21
  • 34
19
votes
6 answers

BaseHTTPRequestHandler with custom instance

this is my http server: from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer class test: def show(self): return "aaaa" class http_server: def __init__(self, t1): self.t1 = t1 server = HTTPServer(('', 8080),…
17
votes
3 answers

How to limit the connections count of an HTTP Server implemented in Go?

I am trying to implement an HTTP Server in Golang. My problem is, I have to limit the maximum active connections count at any particular time to 20.
Alex Mathew
  • 3,925
  • 5
  • 21
  • 25
16
votes
1 answer

CPU-bound process blocks worker pool while using Child Process in NestJS HTTP server

Node version: v10.13.0 I'm trying a very simple test on NodeJS request concurrency involving heavy CPU-calculation. I understand NodeJS is not the best tool for CPU-bound processes, and that a child process should not be spawned systematically, but…
Bob
  • 1,495
  • 1
  • 19
  • 24
16
votes
4 answers

I can't find the apache http server msi installer

I really can't find the apache http server msi. All links lead to this page: http://download.nextag.com/apache//httpd/binaries/win32/ and when I use their mirror site still no .msi. Where can i find the latest version of apache http server msi?…
user1888598
  • 193
  • 1
  • 2
  • 8
16
votes
1 answer

Node equivalent of `python -m SimpleHTTPServer`?

The existence of these modules suggests Node does not ship with an equivalent command: https://www.npmjs.org/package/simplehttpserver https://www.npmjs.org/package/simple-http-server
davidchambers
  • 23,918
  • 16
  • 76
  • 105
16
votes
3 answers

How to serve static content using suns simple httpserver

I'm using jersey's HttpServerFactory to create a simple embedded HttpServer that hosts a couple of rest services. We just needed something small quick and lightweight. I need to host a small static html page inside the same server instance. Is…
Jay Mann
  • 183
  • 1
  • 8
15
votes
1 answer

Can I run an HTTP server on a mobile platform?

I am building a webapp that cannot be put into the app store (security reasons). The webapp needs access to more data than can be held in localStorage or other offline-storage means (let's say up to 1GB of data). My idea of a solution is to code up…
beatgammit
  • 19,817
  • 19
  • 86
  • 129
15
votes
4 answers

http-server command not found

I'm trying to run a basic http-server to test out some html files and I keep running into the same error. I did sudo npm install -g http-server a bunch of times, but each time I try simple git:(master) http-server I keep getting this error: zsh:…
Jordan Forbes
  • 183
  • 1
  • 1
  • 9
15
votes
3 answers

Node js as http server and host angularJS SPA

I have an application written on angularJS and built by grunt. Is there a way I can create a http server from node js and host it there. Please share any code snippet or document which would help. Thanks
dhana
  • 163
  • 1
  • 1
  • 6
15
votes
4 answers

Python: BaseHTTPRequestHandler - Read raw post

How do I read the raw http post STRING. I've found several solutions for reading a parsed version of the post, however the project I'm working on submits a raw xml payload without a header. So I am trying to find a way to read the post data without…
kwolfe
  • 1,663
  • 3
  • 17
  • 27
14
votes
6 answers

Eclipse cant recognize com.sun.net.httpserver.HttpServer package

I have a home-work to create a http server with java , a simple one and from scratch . After searching google and here ...i found this link "see the best response" with a very nice response ,so i copy/paste this example to eclipse , but it doesn't…
Andi Domi
  • 731
  • 2
  • 19
  • 48
13
votes
4 answers

Strange JQuery Error "code 501, message Unsupported method OPTIONS"

I am learning the JQuery Get method. I start up a Python HTTP server: (just typing command "Python -m SimpleHTTPServer"). It's fine to test this webserver by just visiting "http://localhost:80" on my web browser. However, when I write this very…
Xiao
  • 555
  • 1
  • 5
  • 19
13
votes
1 answer

Serve a file from Python's http.server - correct response with a file

I am simply trying to serve a PDF file from the http.server. Here is my code: from http.server import BaseHTTPRequestHandler, HTTPServer class MyServer(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) …
Clone
  • 3,378
  • 11
  • 25
  • 41
13
votes
1 answer

Why isn't this go HTTP server spawning a goroutine per request in Chrome 47?

Previously titled: How to spawn goroutine per HTTP request? The code below is a simple HTTP server that echos the path back to the requester. I used it to test if the ListenAndServe method of the net/http package by default fires a goroutine to…
tlovely
  • 645
  • 1
  • 5
  • 15
1 2
3
85 86