Commit Graph

18 Commits

Author SHA1 Message Date
kim (grufwub)
6bdeb86863 major underlying changes
- remove GophorConn, instead make Worker the object that
  holds onto Host, Client, RootDir etc

- create BufferedDeadlineConn to wrap DeadlineConn and wrap all
  read/write operations in buffered operations

- Have Responder hold onto BufferedDeadlineConn instead of writer

- version bump :)

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-15 13:29:04 +01:00
kim (grufwub)
303a6bbcd0 remove in-line shell command support, add initial remap (according to regex) support
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-12 13:48:21 +01:00
kim (grufwub)
ab82b53b2a fix critical bug with broken directory listing selectors
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-08 17:39:31 +01:00
kim (grufwub)
43ddf00b36 massively improve code commenting, fix SkipPrefixWriter bug
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-08 16:52:17 +01:00
kim (grufwub)
4bf0e88ac6 finish up changes to virtual file remapping implementation
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-07 21:15:47 +01:00
kim (grufwub)
0b8c3b41ba add virtual filesystem support (remapping file paths)
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-07 20:52:25 +01:00
kim (grufwub)
c7ae3fd151 more big changes
- Current Request structure renamed to Responder

- Request's RequestPath and Parameters separated into
  new Request structure

- Responder sent on calls to render to filecontents,
  but creation / caching of filecontents stores onto a
  a copy of Request instead (as we don't need the extra host
  or client info held by Responder)

- Cached gophermaps now do not cache regular files within them
  if inserted, as these files could be over the cache file size
  limit

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-07 08:59:53 +01:00
kim (grufwub)
9ea253d9bb switch underlying request writer to use a buffered writer
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-06 18:21:21 +01:00
kim (grufwub)
8dae2abb6f move struct member usage to instead be struct methods, improve README.md
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-06 11:38:53 +01:00
kim (grufwub)
3a41efcc5b huge changes
- massively improve request handling -- passes request object between
  functions now to encapsulate all the data needed

- writing is now handled by the passed request object with attached
  writer

- files > max cached file size and fed directly to socket now instead
  of read into buffer first (which would have caused MAJOR memory issues)

- CGI support further fleshed out, and timer started for child processes
  that attempts to kill them if they don't clean up in time

- probably many more fixes i'm forgetting

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-05 23:46:50 +01:00
kim (grufwub)
6cd6adecca move requestpath contents into filesystemrequest, which is passed everywhere instead of individual variables
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-04 18:19:56 +01:00
kim (grufwub)
eac520031a inline shell commands, executable gophermaps, initial cgi-bin support
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-03 22:42:51 +01:00
kim (grufwub)
41d6f279fc replace logging system + add support for log options + toggleable output
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-02 22:34:49 +01:00
kim (grufwub)
804df8bb26 remove requestpath's abspath member, modify function names
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-01 17:07:59 +01:00
kim (grufwub)
0893652b65 add RequestPath to handle relative+absolute paths, move sanitization logic here
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-05-01 15:08:47 +01:00
kim (grufwub)
5cb9a6cb9e add footer text support + move last-line addition to footer text
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-04-30 13:58:29 +01:00
kim (grufwub)
1c119afa1c move worker constants to constants.go, filetype type defintion to filesystem.go
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-04-30 10:48:24 +01:00
kim (grufwub)
f9b0206aff move fs.go -> filesystem.go, cache.go into filesystem.go, some fs.go contents into filesystem_read.go
Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2020-04-30 10:27:05 +01:00