forked from libwww-perl/libwww-perl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
NOTES.txt
63 lines (49 loc) · 1.86 KB
/
NOTES.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
HTTP::Message
-------------
- option to keep file content in file (save method?)
- save message to file (separate file for headers and content?)
- option to move file content to temp file if it grows big enough
- bind( $filename ) # discard current content (read file/write lazily)
- save( $filename ) # write current content to file and bind()
- rename( $filename ) # croak if not bound
- close() # in case file handle is open, flush saved content
- unbind(keep_content/reset_content/unlink)
- bound() # returns the bound filename (or false)
- tempfile(template, DIR, SUFFIX, TMPDIR, CLEANUP, LIMIT)
- read($offset, $length)
- alternative is to expose the IO::Handle interface (IO::String for compat)
- length # return -s
- content_length # already a method giving access to the Header field
- methods to sync header fields and file meta data
- Last-Modified
- Content-Length
- Content-Type
- Content-Encoding
- Content-MD5
- state kept to track file binding
- filename
- fh
- open_readonly
- temp_limit
- temp_options
- interaction with current interface
- content_ref modifications problematic
- do we implement content_ref at all?
- file suffix should stay in sync as the file is encoded/decoded
- parts (when does modification happen)
- clear; implies unbind(reset_content)
- clone; implies unbind(keep_content)?, no shared $fh at least
- optionally loaded as HTTP::Message::File (?)
- a way to store headers, status line, etc in a file as well?
- decode stream (reusable in LWP::Protocol)
- registry of encoders for encode/decode
LWP::UserAgent
--------------
- raise HTTP::Response objects as exceptions
Data::Sink/Source
-----------------
- alternative consumer/producer
- get/read, close
- put/write/feed, flush, close
- reset
- http://effbot.org/zone/consumer.htm