Skip to content

smart HTTP jgit eclipse #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ghost opened this issue Jul 8, 2013 · 1 comment
Closed

smart HTTP jgit eclipse #47

ghost opened this issue Jul 8, 2013 · 1 comment
Assignees

Comments

@ghost
Copy link

ghost commented Jul 8, 2013

This change to git_http_controller.rb helped us to get the git-plugin of eclipse working.
Problem was the automatically appended charset=UTF-8 for the Content-Transfer-Encoding.
This discussion http://stackoverflow.com/questions/3433059/remove-charset-from-rails-content-type helped us to fix it.

Please consider to change the code accordingly:

diff --git a/app/controllers/git_http_controller.rb b/app/controllers/git_http_controller.rb
index 27e1f6d..e25561d 100644
--- a/app/controllers/git_http_controller.rb
+++ b/app/controllers/git_http_controller.rb
@@ -159,6 +159,7 @@ class GitHttpController < ApplicationController

       self.response.status = 200
       self.response.headers["Content-Type"] = content_type
+      self.response.headers["Content-Transfer-Encoding"] = "binary"
       hdr_nocache

       if Rails::VERSION::MAJOR >= 3

Thank you for this great plugin!

@ghost ghost assigned n-rodriguez Jul 8, 2013
@n-rodriguez
Copy link
Contributor

Fixed in commit : 1e58322

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant