justinchen-fluther 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/fluther/proxy.rb +3 -2
- metadata +7 -7
data/lib/fluther/proxy.rb
CHANGED
@@ -40,6 +40,7 @@ protected
|
|
40
40
|
'User-Agent' => "Fluther Federated Client #{Fluther::ClientVersion} (Ruby)",
|
41
41
|
'X-Forwarded-For' => @in_req.env['REMOTE_ADDR'],
|
42
42
|
'X-Forwarded-Host' => @in_req.env['HTTP_HOST'],
|
43
|
+
'X-Forwarded-User-Agent' => @in_req.user_agent
|
43
44
|
}
|
44
45
|
}
|
45
46
|
options[:head]['X-Requested-With'] = @in_req.env['HTTP_X_REQUESTED_WITH'] if @in_req.env['HTTP_X_REQUESTED_WITH']
|
@@ -47,6 +48,7 @@ protected
|
|
47
48
|
|
48
49
|
path = @in_req.path.sub( %r{^#{@prefix}}, '' )
|
49
50
|
path = '/' + path unless path.starts_with?('/')
|
51
|
+
path = path + '/' unless path.ends_with?('/')
|
50
52
|
url = "#{@in_req.scheme}://#{Fluther::Config.fluther_host}#{path}"
|
51
53
|
|
52
54
|
Rails.logger.debug @in_req.request_method
|
@@ -84,9 +86,8 @@ Rails.logger.debug options
|
|
84
86
|
end
|
85
87
|
|
86
88
|
def handle_response( fluther )
|
87
|
-
Rails.logger.debug fluther.response_header.status
|
89
|
+
Rails.logger.debug "Fluther HTTP Response Code: #{fluther.response_header.status}"
|
88
90
|
Rails.logger.debug fluther.response_header
|
89
|
-
|
90
91
|
type_header = fluther.response_header['CONTENT_TYPE']
|
91
92
|
content_type = type_header.split(';')[0] || 'text/html'
|
92
93
|
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: justinchen-fluther
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 1
|
10
|
+
version: 1.0.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
-
|
13
|
+
- Justin CHen
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
@@ -32,8 +32,8 @@ dependencies:
|
|
32
32
|
version: "0"
|
33
33
|
type: :runtime
|
34
34
|
version_requirements: *id001
|
35
|
-
description:
|
36
|
-
email:
|
35
|
+
description: Modified version of the original fluther gem.
|
36
|
+
email: justin@menuism.com
|
37
37
|
executables: []
|
38
38
|
|
39
39
|
extensions: []
|
@@ -47,7 +47,7 @@ files:
|
|
47
47
|
- lib/fluther/config.rb
|
48
48
|
- lib/fluther/proxy.rb
|
49
49
|
has_rdoc: true
|
50
|
-
homepage: http://github.com/
|
50
|
+
homepage: http://github.com/justinchen/fluther
|
51
51
|
licenses: []
|
52
52
|
|
53
53
|
post_install_message:
|