raw_net_capture 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/raw_net_capture.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d6cf8bbc933a2477cb83cbcb3d6dcbfdd24a31d
|
4
|
+
data.tar.gz: 2f5ed8a2ffa6af154039ea1d2ec27ee6ec255a58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aea4d1138a7f2cdd04a8675f6975011218069e74fd5fa35078389c158a7b1dafffd5c2e18a80dc857a4d221fe6065381dd892e032ecf6eb9e7c51ff1634f8f52
|
7
|
+
data.tar.gz: e5948bcdf2da1be5915bd72ac32458ab2ecf5e95cba15fbd07e41a9b5add9cc3dbe7189d6200f987deffb6aa430b709f9a031268c57064b25afc3b7099c4cc80
|
data/lib/raw_net_capture.rb
CHANGED
@@ -41,6 +41,16 @@ class RawHTTPCapture < StringIO
|
|
41
41
|
def sent(data)
|
42
42
|
@raw_sent << data
|
43
43
|
end
|
44
|
+
|
45
|
+
def headers
|
46
|
+
separator = "\r\n\r\n"
|
47
|
+
raw_string = @raw_received.string
|
48
|
+
if headers_end_index = raw_string.index(separator)
|
49
|
+
raw_string[0...(headers_end_index + separator.length)]
|
50
|
+
else
|
51
|
+
raw_string
|
52
|
+
end
|
53
|
+
end
|
44
54
|
end
|
45
55
|
|
46
56
|
module Net
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raw_net_capture
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Grossman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-01-
|
12
|
+
date: 2015-01-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: appraisal
|