|
|
@ -74,12 +74,13 @@ class InfoRefsServlet extends HttpServlet { |
|
|
|
rsp.setCharacterEncoding(Constants.CHARACTER_ENCODING); |
|
|
|
rsp.setCharacterEncoding(Constants.CHARACTER_ENCODING); |
|
|
|
|
|
|
|
|
|
|
|
final Repository db = getRepository(req); |
|
|
|
final Repository db = getRepository(req); |
|
|
|
final OutputStreamWriter out = new OutputStreamWriter( |
|
|
|
try (OutputStreamWriter out = new OutputStreamWriter( |
|
|
|
new SmartOutputStream(req, rsp, true), |
|
|
|
new SmartOutputStream(req, rsp, true), |
|
|
|
Constants.CHARSET); |
|
|
|
Constants.CHARSET)) { |
|
|
|
final RefAdvertiser adv = new RefAdvertiser() { |
|
|
|
final RefAdvertiser adv = new RefAdvertiser() { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected void writeOne(final CharSequence line) throws IOException { |
|
|
|
protected void writeOne(final CharSequence line) |
|
|
|
|
|
|
|
throws IOException { |
|
|
|
// Whoever decided that info/refs should use a different
|
|
|
|
// Whoever decided that info/refs should use a different
|
|
|
|
// delimiter than the native git:// protocol shouldn't
|
|
|
|
// delimiter than the native git:// protocol shouldn't
|
|
|
|
// be allowed to design this sort of stuff. :-(
|
|
|
|
// be allowed to design this sort of stuff. :-(
|
|
|
@ -97,6 +98,6 @@ class InfoRefsServlet extends HttpServlet { |
|
|
|
Map<String, Ref> refs = db.getRefDatabase().getRefs(ALL); |
|
|
|
Map<String, Ref> refs = db.getRefDatabase().getRefs(ALL); |
|
|
|
refs.remove(Constants.HEAD); |
|
|
|
refs.remove(Constants.HEAD); |
|
|
|
adv.send(refs); |
|
|
|
adv.send(refs); |
|
|
|
out.close(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|