質問編集履歴
1
訂正
test
CHANGED
File without changes
|
test
CHANGED
@@ -67,3 +67,93 @@
|
|
67
67
|
わからないので解決方法を教えてくださいお願いします。
|
68
68
|
|
69
69
|
また、コードの説明で誤っているものを見つけたら教えてください。
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
**追記**
|
74
|
+
|
75
|
+
コードに
|
76
|
+
|
77
|
+
```ruby
|
78
|
+
|
79
|
+
http.set_debug_output $stderr
|
80
|
+
|
81
|
+
```
|
82
|
+
|
83
|
+
```cmd
|
84
|
+
|
85
|
+
opening connection to www.amazon.co.jp:443...
|
86
|
+
|
87
|
+
opened
|
88
|
+
|
89
|
+
starting SSL for www.amazon.co.jp:443...
|
90
|
+
|
91
|
+
SSL established
|
92
|
+
|
93
|
+
<- "POST /s/ref=nb_sb_noss HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: Ruby\r\nContent-Type: application/x-www-form-urlencoded\r\nConnection: close\r\nHost: www.amazon.co.jp\r\nContent-Length: 24\r\n\r\n"
|
94
|
+
|
95
|
+
<- "field-keywords%3D=sample"
|
96
|
+
|
97
|
+
-> "HTTP/1.1 301 Moved Permanently\r\n"
|
98
|
+
|
99
|
+
-> "Transfer-Encoding: chunked\r\n"
|
100
|
+
|
101
|
+
-> "Connection: close\r\n"
|
102
|
+
|
103
|
+
-> "Server: Server\r\n"
|
104
|
+
|
105
|
+
-> "Date: Thu, 18 Jul 2019 10:52:27 GMT\r\n"
|
106
|
+
|
107
|
+
-> "Strict-Transport-Security: max-age=47474747; includeSubDomains; preload\r\n"
|
108
|
+
|
109
|
+
-> "Vary: Accept-Encoding,User-Agent,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment\r\n"
|
110
|
+
|
111
|
+
-> "Content-Language: ja-JP\r\n"
|
112
|
+
|
113
|
+
-> "Location: /\r\n"
|
114
|
+
|
115
|
+
-> "Content-Encoding: gzip\r\n"
|
116
|
+
|
117
|
+
-> "X-XSS-Protection: 1;\r\n"
|
118
|
+
|
119
|
+
-> "X-Content-Type-Options: nosniff\r\n"
|
120
|
+
|
121
|
+
-> "X-Frame-Options: SAMEORIGIN\r\n"
|
122
|
+
|
123
|
+
-> "x-amz-rid: QSRPAX02WBR568F9P92Y\r\n"
|
124
|
+
|
125
|
+
-> "X-Cache: Miss from cloudfront\r\n"
|
126
|
+
|
127
|
+
-> "Via: 1.1 b59fc5b326cd7a1c5137742614e4ef0a.cloudfront.net (CloudFront)\r\n"
|
128
|
+
|
129
|
+
-> "X-Amz-Cf-Pop: NRT12-C1\r\n"
|
130
|
+
|
131
|
+
-> "X-Amz-Cf-Id: Re0t7lWxe41IlRgpS26oriO67okMLSA2Cq7S9NBQT29HCwyk8jrxdQ==\r\n"
|
132
|
+
|
133
|
+
-> "\r\n"
|
134
|
+
|
135
|
+
-> "14\r\n"
|
136
|
+
|
137
|
+
reading 20 bytes...
|
138
|
+
|
139
|
+
-> "\x1F\x8B\b\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
140
|
+
|
141
|
+
read 20 bytes
|
142
|
+
|
143
|
+
reading 2 bytes...
|
144
|
+
|
145
|
+
-> "\r\n"
|
146
|
+
|
147
|
+
read 2 bytes
|
148
|
+
|
149
|
+
-> "0\r\n"
|
150
|
+
|
151
|
+
-> "\r\n"
|
152
|
+
|
153
|
+
Conn close
|
154
|
+
|
155
|
+
```
|
156
|
+
|
157
|
+
を追加したところ
|
158
|
+
|
159
|
+
との結果がでましたがこれは。。。
|