remotebackend http: move iterator loops into a helper func
Merge pull request #2 from zeha/remobackend-improvements

remotebackend http: move iterator loops into a helper func