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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/raw_net_capture.rb +10 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f1efc8f70b2f5e320eddfd58cfb298318008694
4
- data.tar.gz: 25825e1efeaaa5789d73c64b48416f65bb07c000
3
+ metadata.gz: 1d6cf8bbc933a2477cb83cbcb3d6dcbfdd24a31d
4
+ data.tar.gz: 2f5ed8a2ffa6af154039ea1d2ec27ee6ec255a58
5
5
  SHA512:
6
- metadata.gz: 60b7500326a8a3c3f49c7b64a67e25db4fc9733ac81131bd631244ef050eef1a39c5610282841a54ddb1e4eb598f65a1695ed3d0c9450335ea4c2ef73aff674f
7
- data.tar.gz: f46e16ec6cebede513ce1c2138a962dd0aaa7721a241b989284d104651112b059ead20ff20474d01c92c251ec7e35f47f3169760d7ffac8d53e17aa7d5e57b5a
6
+ metadata.gz: aea4d1138a7f2cdd04a8675f6975011218069e74fd5fa35078389c158a7b1dafffd5c2e18a80dc857a4d221fe6065381dd892e032ecf6eb9e7c51ff1634f8f52
7
+ data.tar.gz: e5948bcdf2da1be5915bd72ac32458ab2ecf5e95cba15fbd07e41a9b5add9cc3dbe7189d6200f987deffb6aa430b709f9a031268c57064b25afc3b7099c4cc80
@@ -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.0.0
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-22 00:00:00.000000000 Z
12
+ date: 2015-01-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appraisal