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

How to compile and send result php code in python http server?

I am wriritng HTTP server with python socket. I have a web page that contain PHP code like this which a want to send to client, when i send it normally the PHP…
-2
votes
3 answers

How to download or list all files on a website directory

I have a pdf link like www.xxx.org/content/a.pdf, and I know that there are many pdf files in www.xxx.org/content/ directory but I don't have the filename list. And When I access www.xxx.org/content/ using browser, it will redirect to…
LeoYang
  • 21
  • 1
  • 1
  • 1
-2
votes
1 answer

What is the path you pass to npm http-server?

I'm using a mac and I made a directory on my desktop called "reg" with an index.html in it and then tried running http-server "Desktop/reg/" but it didn't work. I tried adding in my absolute path like"/Users/johndoe/Desktop/reg/"` and it doesn't…
stackjlei
  • 9,485
  • 18
  • 65
  • 113
-2
votes
3 answers

java HTTP server client example

I get a http server from this link: http://www.rgagnon.com/javadetails/java-have-a-simple-http-server.html (the first example) I run it an it's fine working. Then I used the following small code as a client to communicate with the server: import…
Kallel Omar
  • 1,208
  • 2
  • 17
  • 51
-2
votes
1 answer

HTTP 1.1 chunk-size computation algorithm

This is rather a question to satisfy curiosity. How does standard HTTP 1.1 stacks compute chunk-sizes on a HTTP response socket? Is it timeout based, max size based or depends on when the application does a flush on the socket, or an algorithm based…
-2
votes
1 answer

How many visits a website receives within the last 5 minutes

This is an interview question I got recently. It is likely to related to some front-web development, which I do not have much experience with. The question is "How do you calculate the number of visits a website receives in the last 5…
Kevin Hu
  • 67
  • 1
  • 6
-3
votes
1 answer

golang dont understand how http.Server Handler calling functions which attahced to empty struct

i have this code of simple web server but i dont understand this code : Handler:app.routes(), const webPort = "80" type Config struct {} func main() { app := Config{} log.Printf("Starting broker service on port %s\n",webPort) srv :=…
user63898
  • 29,839
  • 85
  • 272
  • 514
-3
votes
1 answer

Who is responsible for implementing the properties of the HTTP methods? Is it browser or HTTP Server or both?

As we all aware the HTTP method has certain properties like, idempotent, safe and cache-able and its defined through HTTP specification by W3C. My question is who is responsible to implement these HTTP properties. Is browser client, or the server,…
-4
votes
1 answer

How to make POST request with HttpServer?

I have created a local HTTP server (using Java’s HttpServer class) to redirect end-users after authenticating themselves to an authorization server using OAuth 2.0. Is it possible to send a POST request from this server to the authorization server…
-4
votes
1 answer

Memory consumption with large array with Echo or Gin framework

I have a memory problem when I try to send a large array with Echo (and Gin too). After the request, memory is not free. package main import ( "net/http" "strconv" "github.com/labstack/echo" ) type User struct { Username string …
-4
votes
2 answers

Why simple http-server not running in 127.0.0.0:8080 but in 127.0.0.1:8080?

I need to run a simple http-server using nodejs. I have installed in my local repo using npm. When i run the below command, i am getting th e following message nodejs node-modules/http-server/bin/http-server -a 127.0.0.0 Starting up http-server,…
SELVA
  • 135
  • 1
  • 3
  • 10
1 2 3
85
86