zhamlin / ahkhttp Goto Github PK
View Code? Open in Web Editor NEWHTTP Server
License: GNU General Public License v2.0
HTTP Server
License: GNU General Public License v2.0
Hi,
There's a memory leak somewhere, even when using the example scripts.
After receiving some amount of requests (1000? 2000?) it will crash.
I am not sure if the problem is in AhkHttp.ahk or AhkSock.ahk.
I guess maybe an object or array is not cleared somewhere? I have had a look but couldn't find anything.
Has anyone any idea please?
Thanks.
ServeFile(ByRef response, file) {
f := FileOpen(file, "r")
length := f.RawRead(data, f.Length)
f.Close()
response.SetBody(data, length)
res.headers["Content-Type"] := this.GetMimeType(file)
}
The bold line i think res sould be response.
I'm having troubles accessing the http server on another device on the same network. Using http://10.0.0.31:8000/ (my local ip address) on my local machine works, but it doesn't work on other devices on the same network. How do I ensure the service is exposed to all ip addresses and not just localhost?
For example, I want to upload a file to the server.
How to parse the data and save it as a file?
For example: the extensions of file ,such as zip, doc, png, txt and so
on
<form action="/upload" method="POST" enctype="multipart/form-data">
<input type="file" name="file" />
<input type="submit" value="upload" />
</form>
But I don't know how to parse the data and save it as a file.
PS: use above html code the ["Expect"] Is empty.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.