protocol-http 0.25.0 → 0.26.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/http/body/stream.rb +5 -1
- data/lib/protocol/http/header/authorization.rb +2 -4
- data/lib/protocol/http/header/connection.rb +1 -1
- data/lib/protocol/http/header/date.rb +1 -1
- data/lib/protocol/http/version.rb +1 -1
- data/license.md +2 -1
- data/readme.md +5 -8
- data.tar.gz.sig +0 -0
- metadata +8 -5
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78df5c09889fbba8150a172d085d646850e286ff263d75651240346e918e94b3
|
4
|
+
data.tar.gz: ef5914cbb06341c27974ac57ebb9f2799beac0976d84081166d6dbd3c1d32530
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d84a1f3eb31ca1f44ef6f390bae189d1bea595478a1486bcd04f41ef2c088e2f8d1989ed279056d9a30be688bacbd7c3481cd18484222e88ed93195a81016fd
|
7
|
+
data.tar.gz: dcbf2a95b67dd0f2631e5f9339b16c06149e686bf8ff9bc5525bc389cc78692b5a62fcdbc1b830f3f0d7a8ce37472fd3d9ac281ec1c981ce3e558afeb55485d4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2019-
|
4
|
+
# Copyright, 2019-2024, by Samuel Williams.
|
5
5
|
# Copyright, 2023, by Genki Takiuchi.
|
6
6
|
|
7
7
|
require_relative 'buffered'
|
@@ -98,6 +98,10 @@ module Protocol
|
|
98
98
|
return buffer
|
99
99
|
end
|
100
100
|
|
101
|
+
def readpartial(length)
|
102
|
+
read_partial(length) or raise EOFError, "End of file reached!"
|
103
|
+
end
|
104
|
+
|
101
105
|
def read_nonblock(length, buffer = nil)
|
102
106
|
@buffer ||= read_next
|
103
107
|
chunk = nil
|
@@ -3,8 +3,6 @@
|
|
3
3
|
# Released under the MIT License.
|
4
4
|
# Copyright, 2019-2023, by Samuel Williams.
|
5
5
|
|
6
|
-
require 'base64'
|
7
|
-
|
8
6
|
module Protocol
|
9
7
|
module HTTP
|
10
8
|
module Header
|
@@ -21,10 +19,10 @@ module Protocol
|
|
21
19
|
end
|
22
20
|
|
23
21
|
def self.basic(username, password)
|
24
|
-
|
22
|
+
strict_base64_encoded = ["#{username}:#{password}"].pack('m0')
|
25
23
|
|
26
24
|
self.new(
|
27
|
-
"Basic #{
|
25
|
+
"Basic #{strict_base64_encoded}"
|
28
26
|
)
|
29
27
|
end
|
30
28
|
end
|
data/license.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# MIT License
|
2
2
|
|
3
|
-
Copyright, 2018-
|
3
|
+
Copyright, 2018-2024, by Samuel Williams.
|
4
4
|
Copyright, 2019, by Yuta Iwama.
|
5
5
|
Copyright, 2020, by Olle Jonsson.
|
6
6
|
Copyright, 2020, by Bryan Powell.
|
@@ -9,6 +9,7 @@ Copyright, 2022, by Herrick Fang.
|
|
9
9
|
Copyright, 2022, by Dan Olson.
|
10
10
|
Copyright, 2023, by Genki Takiuchi.
|
11
11
|
Copyright, 2023, by Thomas Morgan.
|
12
|
+
Copyright, 2023, by Marcelo Junior.
|
12
13
|
|
13
14
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
14
15
|
of this software and associated documentation files (the "Software"), to deal
|
data/readme.md
CHANGED
@@ -8,18 +8,15 @@ Provides abstractions for working with the HTTP protocol.
|
|
8
8
|
|
9
9
|
- General abstractions for HTTP requests and responses.
|
10
10
|
- Symmetrical interfaces for client and server.
|
11
|
-
- Light-weight
|
11
|
+
- Light-weight middleware model for building applications.
|
12
12
|
|
13
13
|
## Usage
|
14
14
|
|
15
|
-
Please see the [project documentation](https://github.
|
15
|
+
Please see the [project documentation](https://socketry.github.io/protocol-http/) for more details.
|
16
16
|
|
17
|
-
- [Getting Started](https://github.
|
18
|
-
to use `protocol-http` for building abstract HTTP interfaces.
|
17
|
+
- [Getting Started](https://socketry.github.io/protocol-http/guides/getting-started/index) - This guide explains how to use `protocol-http` for building abstract HTTP interfaces.
|
19
18
|
|
20
|
-
- [Design Overview](https://github.
|
21
|
-
by <code class="language-ruby">Protocol::HTTP</code> underpin all downstream implementations. Therefore, we provide
|
22
|
-
some justification for the design choices.
|
19
|
+
- [Design Overview](https://socketry.github.io/protocol-http/guides/design-overview/index) - This guide explains the high level design of `protocol-http` in the context of wider design patterns that can be used to implement HTTP clients and servers.
|
23
20
|
|
24
21
|
## Contributing
|
25
22
|
|
@@ -37,7 +34,7 @@ This project uses the [Developer Certificate of Origin](https://developercertifi
|
|
37
34
|
|
38
35
|
### Contributor Covenant
|
39
36
|
|
40
|
-
This project is governed by [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
37
|
+
This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
|
41
38
|
|
42
39
|
## See Also
|
43
40
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,15 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protocol-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.26.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
- Bruno Sutic
|
9
9
|
- Herrick Fang
|
10
|
+
- Thomas Morgan
|
10
11
|
- Bryan Powell
|
11
12
|
- Dan Olson
|
12
13
|
- Genki Takiuchi
|
14
|
+
- Marcelo Junior
|
13
15
|
- Olle Jonsson
|
14
16
|
- Yuta Iwama
|
15
17
|
autorequire:
|
@@ -44,7 +46,7 @@ cert_chain:
|
|
44
46
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
45
47
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
46
48
|
-----END CERTIFICATE-----
|
47
|
-
date:
|
49
|
+
date: 2024-02-07 00:00:00.000000000 Z
|
48
50
|
dependencies: []
|
49
51
|
description:
|
50
52
|
email:
|
@@ -94,7 +96,8 @@ files:
|
|
94
96
|
homepage: https://github.com/socketry/protocol-http
|
95
97
|
licenses:
|
96
98
|
- MIT
|
97
|
-
metadata:
|
99
|
+
metadata:
|
100
|
+
documentation_uri: https://socketry.github.io/protocol-http/
|
98
101
|
post_install_message:
|
99
102
|
rdoc_options: []
|
100
103
|
require_paths:
|
@@ -103,14 +106,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
106
|
requirements:
|
104
107
|
- - ">="
|
105
108
|
- !ruby/object:Gem::Version
|
106
|
-
version:
|
109
|
+
version: '3.0'
|
107
110
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
108
111
|
requirements:
|
109
112
|
- - ">="
|
110
113
|
- !ruby/object:Gem::Version
|
111
114
|
version: '0'
|
112
115
|
requirements: []
|
113
|
-
rubygems_version: 3.
|
116
|
+
rubygems_version: 3.5.3
|
114
117
|
signing_key:
|
115
118
|
specification_version: 4
|
116
119
|
summary: Provides abstractions to handle HTTP protocols.
|
metadata.gz.sig
CHANGED
Binary file
|