# question on service commands in http-backend.c

2 messages from 2010-09-05 to 2010-09-05. Participants: Sitaram Chamarty, Shawn Pearce.
Thread: https://gitlist.dev/t/24985

## Sitaram Chamarty, 2010-09-05 15:29

Subject: question on service commands in http-backend.c
Message-ID: <AANLkTikH5yzHBA_KO_aMFn6bp3LnMS40S_c3P1QQO4gj@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikH5yzHBA_KO_aMFn6bp3LnMS40S_c3P1QQO4gj%40mail.gmail.com

```
Hi,

Short version: can I assume that, of all the service commands [I
assume that's what they're called] in the services[] array in
http-backend.c (approx line 530), only 'git-receive-pack' represents a
*write* attempt?

Long version: I just managed to fixup gitolite so it can be used with
smart http also, and after all that was done I got to wondering about
this.  It matters to gitolite because it needs to recognise whether
the user is trying to perform a write or a read so it can make the
correct access control decision.

With ssh it was very simple: you only had 3 command
(git-upload-archive, git-upload-pack, git-receive-pack) and the first
2 are "read"s.

And yes, I do notice that these new ones are all "GET" so it is hardly
likely they'd be writes -- just wanted to make sure...

Thanks,

-- 
Sitaram

```

## Shawn Pearce, 2010-09-05 21:20

Subject: Re: question on service commands in http-backend.c
Message-ID: <AANLkTikjvWpKmf6MP3-=US06XiWkR5cOwHVfVrNUme3w@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikjvWpKmf6MP3-%3DUS06XiWkR5cOwHVfVrNUme3w%40mail.gmail.com
In-Reply-To: <AANLkTikH5yzHBA_KO_aMFn6bp3LnMS40S_c3P1QQO4gj@mail.gmail.com>

```
On Sun, Sep 5, 2010 at 8:29 AM, Sitaram Chamarty <sitaramc@gmail.com> wrote:
> Short version: can I assume that, of all the service commands [I
> assume that's what they're called] in the services[] array in
> http-backend.c (approx line 530), only 'git-receive-pack' represents a
> *write* attempt?

Correct.

> And yes, I do notice that these new ones are all "GET" so it is hardly
> likely they'd be writes -- just wanted to make sure...

Right.  :-)

-- 
Shawn.

```
