HTTPServer, small but usefull update request

Hi, VVVV Team!

I often use HTTPServer node. Its helps to create simple web interfaces for our applications.

But 2 things make me cry, i got a lot of pain with it.

  1. very simple
    encoding
    Is it possible to make selectable encoding? I think, it’s about 15 minutes to work.

  2. more complicated
    response to browser request on next frame or later. You may make it switchable for backward-compatibility.

  1. do you mean the encoding of the Content of the HTTP (Network Server)?

i fear its not that trivial, what you really want is probably a raw input so you can put a string to raw bytes conversion with the desired encoding in front of it.
maybe it helps for now to do a string conversion before the node? or do you need to receive a specified encoding in the browser?

  1. is this regarding the HTTP (Network Receiver)? what you are suggesting is that the receiver waits for the server node? this would mean you need to make some kind of link between the two nodes so the vvvv mainloop knows how and when to wait. also not that simple…

anyways, there are a few contributions dealing with the internet, maybe one of them can help:



  1. Sorry, i mean charset in server response, but write encoding

now it’s always looks like

Content-Type →text/html; charset=ISO-8859-1

it’s really simple to change

Http-receiver only shows http request, but server-node sends response

In any case the server-node gets http request from client, the receiver node is present or not.

VVVV-way will be wait with response for a next frame.

You might want to take a look at the HTTPListener (meaning server, listening for connections) here: https://github.com/jens-a-e/hhhhttp-listener

There is a help patch, that gets you started. Note, though, that you have to read the responses at some point, otherwise connections will stack up; but this is regular network programming practice.

Let me know if it helps.