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

Trouble with converting single threaded HTTP server into multithreaded using pthreads

My single threaded HTTP Server works just fine, but I'm having trouble multithreading it. I know I am supposed to use pthreads, locks, and condition variables, but I can't get the logic set up properly. The trouble starts after listening to the…
T-Wayne1
  • 35
  • 1
  • 6
-1
votes
1 answer

How to live stream images in browser?

I am trying to create an app to mirror my phone's screen in a e-book reader's browser. The idea is to continuously make screenshots and make them available from http server running on the phone. So far I have succeeded in having an http server…
jeff
  • 1,169
  • 1
  • 19
  • 44
-1
votes
1 answer

Why is my code different in http-server than what I have in my file?

This is what my code looks like in my script.js file: let defenseTable = document.querySelector('#home-stats'); When I run my code in localhost using http-server it gives an error saying defenseTable is not defined. When I go to debug the code line…
-1
votes
1 answer

Second HTTP server with Spring Boot

I'm using Spring Boot to create a rest server and everything is going fine. But, now I want to create a second http listener in another port to handle static content such as Html, css, js and etc. I've been reading the documentation but I didn't get…
josev.junior
  • 409
  • 2
  • 5
  • 13
-1
votes
1 answer

Ngrok auth token file location

In Mac and Window how to change the auth token of ngrok manually Reference: https://github.com/inconshreveable/ngrok/issues/640
Sriram Karthick
  • 155
  • 2
  • 4
  • 17
-1
votes
2 answers

Despite using Cors with Axios I still get this error: No 'Access-Control-Allow-Origin' header is present on the requested resource

I have worked with Cors before in a MEAN stack app. And it perfectly played its role. However, now I am transitioning to the MERN stack, I keep getting this error despite using CORS in the backend: Access to XMLHttpRequest at…
AG_HIHI
  • 1,705
  • 5
  • 27
  • 69
-1
votes
1 answer

Node.js runserver on GCP Virtual Machine

I have a python application hosted by a node.js frontend. I am running that on a linux vm on Google Cloud virtual machine (GCP). node appname runserver 8080 command starts local server within VM but I am wondering what would be step by step process…
-1
votes
2 answers

started 'http-server' using command prompt its running but not working

I don't know if this is good place to ask this question but i just started studying reactjs and stuck in the beginning, here is the question. I have installed node and Installed http-server from the npm command on the command prompt npm install -g…
waleedd32
  • 473
  • 2
  • 9
  • 23
-1
votes
1 answer

How to get the IP address of a client on HTTP server based python?

I built a simple HTTP server based python, and I would like to print on the console the IP of every client ( in this line - print("IP address of the client "+IP)). Can you help me please do so? I attached the full code of the server, Thanks! The…
Kadio
  • 191
  • 2
  • 3
  • 13
-1
votes
1 answer

ServletContextListener isn't invoked when using com.sun.net.httpserver.HttpServer

I use com.sun.net.httpserver.HttpServer in integration tests. It does its job but I've noticed that ServletContextListener's methods aren't invoked during tests. When I deploy the app to the real Tomcat server I can see its methods being…
ka3ak
  • 2,435
  • 2
  • 30
  • 57
-1
votes
1 answer

IBM HTTP - RewriteRule for http://hostname:port/abc/def/ghi

I'm a newb. I want a rewrite rule that translates URLs on the form: http://hostname:port/abc/def/ghi to http://hostname:port/abc/XYZ/ghi abc is a fixed prefix. ghi is the query string which is back referenced.
Srujan reddy
  • 137
  • 1
  • 16
-1
votes
1 answer

RESTEasy CORS header over com.sun.net.httpserver.HttpServer

I'm working on an application that provides a local rest service. To do this I use resteasy (3.5.0) and for server com.sun.net.httpserver.HttpServer. My goal is to include the CORS header in the all replies. According to the documentation, resteasy…
mr mcwolf
  • 2,574
  • 2
  • 14
  • 27
-1
votes
2 answers

How to use gzip encoding in C programming without using zlib library

I would like use gzip encoding in a simple http server built on C. But I don't want to use zlib library. Please suggest how can I do this?
bingzy
  • 49
  • 10
-1
votes
1 answer

IHS not redirecting the request to WAS

So, I have installed WAS, and IHS. I'm able to access the application directly from WAS. But IHS is trying to reply the request and its not using the plugin to reply the request. I'm able to access the default IHS page, but not to the test…
radicaled
  • 2,369
  • 5
  • 30
  • 44
-1
votes
2 answers

"This method must return a result of type ModelAndView." - when returning a result of type ModelAndView

In the LoginView method it shows an error that there must be a return of type ModelAndView. But I am returning a result of type ModelAndView. @RequestMapping("/login") public loginView( HttpServletRequest request, HttpServletResponse res) { …