<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/lib-httpd, branch v2.4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.9</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-03-13T06:25:06Z</updated>
<entry>
<title>t: pass GIT_TRACE through Apache</title>
<updated>2015-03-13T06:25:06Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2015-03-13T04:51:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=89c57ab3f0168b192d5ccc159972fdb26e0ba80b'/>
<id>urn:sha1:89c57ab3f0168b192d5ccc159972fdb26e0ba80b</id>
<content type='text'>
Apache removes GIT_TRACE from the environment before running
git-http-backend. This can make it hard to debug the server
side of an http session. Let's let it through.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t: support clang/gcc AddressSanitizer</title>
<updated>2014-12-11T22:13:17Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-12-08T07:47:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b0f4c9087e1e016667e34c6c413c57435e591b45'/>
<id>urn:sha1:b0f4c9087e1e016667e34c6c413c57435e591b45</id>
<content type='text'>
When git is compiled with "-fsanitize=address" (using clang
or gcc &gt;= 4.8), all invocations of git will check for buffer
overflows. This is similar to running with valgrind, except
that it is more thorough (because of the compiler support,
function-local buffers can be checked, too) and runs much
faster (making it much less painful to run the whole test
suite with the checks turned on).

Unlike valgrind, the magic happens at compile-time, so we
don't need the same infrastructure in the test suite that we
did to support --valgrind. But there are two things we can
help with:

  1. On some platforms, the leak-detector is on by default,
     and causes every invocation of "git init" (and thus
     every test script) to fail. Since running git with
     the leak detector is pointless, let's shut it off
     automatically in the tests, unless the user has already
     configured it.

  2. When apache runs a CGI, it clears the environment of
     unknown variables. This means that the $ASAN_OPTIONS
     config doesn't make it to git-http-backend, and it
     dies due to the leak detector. Let's mark the variable
     as OK for apache to pass.

With these two changes, running

    make CC=clang CFLAGS=-fsanitize=address test

works out of the box.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>signed push: teach smart-HTTP to pass "git push --signed" around</title>
<updated>2014-09-17T21:58:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-09-15T21:59:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0ea47f9d3307bdb1cd9364acd3e4a463b244bba2'/>
<id>urn:sha1:0ea47f9d3307bdb1cd9364acd3e4a463b244bba2</id>
<content type='text'>
The "--signed" option received by "git push" is first passed to the
transport layer, which the native transport directly uses to notice
that a push certificate needs to be sent.  When the transport-helper
is involved, however, the option needs to be told to the helper with
set_helper_option(), and the helper needs to take necessary action.
For the smart-HTTP helper, the "necessary action" involves spawning
the "git send-pack" subprocess with the "--signed" option.

Once the above all gets wired in, the smart-HTTP transport now can
use the push certificate mechanism to authenticate its pushes.

Add a test that is modeled after tests for the native transport in
t5534-push-signed.sh to t5541-http-push-smart.sh.  Update the test
Apache configuration to pass GNUPGHOME environment variable through.
As PassEnv would trigger warnings for an environment variable that
is not set, export it from test-lib.sh set to a harmless value when
GnuPG is not being used in the tests.

Note that the added test is deliberately loose and does not check
the nonce in this step.  This is because the stateless RPC mode is
inevitably flaky and a nonce that comes back in the actual push
processing is one issued by a different process; if the two
interactions with the server crossed a second boundary, the nonces
will not match and such a check will fail.  A later patch in the
series will work around this shortcoming.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: fix charset detection of extract_content_type()</title>
<updated>2014-06-17T22:25:00Z</updated>
<author>
<name>Yi EungJun</name>
<email>eungjun.yi@navercorp.com</email>
</author>
<published>2014-06-17T22:11:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f34a655d4d1e25f314cd5760e2a39bec28950aa1'/>
<id>urn:sha1:f34a655d4d1e25f314cd5760e2a39bec28950aa1</id>
<content type='text'>
extract_content_type() could not extract a charset parameter if the
parameter is not the first one and there is a whitespace and a following
semicolon just before the parameter. For example:

    text/plain; format=fixed ;charset=utf-8

And it also could not handle correctly some other cases, such as:

    text/plain; charset=utf-8; format=fixed
    text/plain; some-param="a long value with ;semicolons;"; charset=utf-8

Thanks-to: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Yi EungJun &lt;eungjun.yi@navercorp.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote-curl: reencode http error messages</title>
<updated>2014-05-27T16:59:22Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-22T09:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fc1b774c72990f0ff92370316412b19fd72baa77'/>
<id>urn:sha1:fc1b774c72990f0ff92370316412b19fd72baa77</id>
<content type='text'>
We currently recognize an error message with a content-type
"text/plain; charset=utf-16" as text, but we ignore the
charset parameter entirely. Let's encode it to
log_output_encoding, which is presumably something the
user's terminal can handle.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>http: extract type/subtype portion of content-type</title>
<updated>2014-05-27T16:57:00Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-22T09:29:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bf197fd7eebcb3579dd659af35822ce88adc66c8'/>
<id>urn:sha1:bf197fd7eebcb3579dd659af35822ce88adc66c8</id>
<content type='text'>
When we get a content-type from curl, we get the whole
header line, including any parameters, and without any
normalization (like downcasing or whitespace) applied.
If we later try to match it with strcmp() or even
strcasecmp(), we may get false negatives.

This could cause two visible behaviors:

  1. We might fail to recognize a smart-http server by its
     content-type.

  2. We might fail to relay text/plain error messages to
     users (especially if they contain a charset parameter).

This patch teaches the http code to extract and normalize
just the type/subtype portion of the string. This is
technically passing out less information to the callers, who
can no longer see the parameters. But none of the current
callers cares, and a future patch will add back an
easier-to-use method for accessing those parameters.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t5550: test display of remote http error messages</title>
<updated>2014-05-23T19:43:51Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-22T09:29:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbcf2bd3dec1244fdbafb3ec7312ed14d83c0025'/>
<id>urn:sha1:dbcf2bd3dec1244fdbafb3ec7312ed14d83c0025</id>
<content type='text'>
Since commit 426e70d (remote-curl: show server content on
http errors, 2013-04-05), we relay any text/plain error
messages from the remote server to the user. However, we
never tested it.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t/lib-httpd: use write_script to copy CGI scripts</title>
<updated>2014-05-23T19:41:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-22T09:28:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c7db2d16474874b21aad9141e6856f836f719643'/>
<id>urn:sha1:c7db2d16474874b21aad9141e6856f836f719643</id>
<content type='text'>
Using write_script will set our shebang line appropriately
with $SHELL_PATH. The script that is there now is quite
simple and likely to succeed even with a non-POSIX /bin/sh,
but it does not hurt to be defensive.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use distinct username/password for http auth tests</title>
<updated>2014-01-02T18:25:03Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-01-02T07:38:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=afbf5ca507470aab6716671f2ad207c74cd585fb'/>
<id>urn:sha1:afbf5ca507470aab6716671f2ad207c74cd585fb</id>
<content type='text'>
The httpd server we set up to test git's http client code
knows about a single account, in which both the username and
password are "user@host" (the unusual use of the "@" here is
to verify that we handle the character correctly when URL
escaped).

This means that we may miss a certain class of errors in
which the username and password are mixed up internally by
git. We can make our tests more robust by having distinct
values for the username and password.

In addition to tweaking the server passwd file and the
client URL, we must teach the "askpass" harness to accept
multiple values. As a bonus, this makes the setup of some
tests more obvious; when we are expecting git to ask
only about the password, we can seed the username askpass
response with a bogus value.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/http-auth-redirects'</title>
<updated>2013-10-30T19:09:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-10-30T19:09:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=177f0a400955f2345c73a5c8b0459d617429ffd9'/>
<id>urn:sha1:177f0a400955f2345c73a5c8b0459d617429ffd9</id>
<content type='text'>
Handle the case where http transport gets redirected during the
authorization request better.

* jk/http-auth-redirects:
  http.c: Spell the null pointer as NULL
  remote-curl: rewrite base url from info/refs redirects
  remote-curl: store url as a strbuf
  remote-curl: make refs_url a strbuf
  http: update base URLs when we see redirects
  http: provide effective url to callers
  http: hoist credential request out of handle_curl_result
  http: refactor options to http_get_*
  http_request: factor out curlinfo_strbuf
  http_get_file: style fixes
</content>
</entry>
</feed>
