Дима Рубинштейн ([info]dimrub) wrote in [info]lj_dev,
@ 2008-04-06 22:22:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
Bug reports?
Where should I file a ticket for LJ code? The particular issue is that LJ's server either disregards or mishandles the If-Modified-Since header of a request, resulting in repeated downloads of pages already existent on the client.


(Post a new comment)


[info]pauamma
2008-04-06 09:04 pm UTC (link)
In many cases, this is very hard to avoid, because many pages are generated dynamically, and it can be very hard to determine what actions modify a page. For instance, my friends page can be modified in several ways, among which:
- by someone on my friends list posting an entry that I have access to.
- by me adding someone to my friends list.
- by someone on my friends list friending me back or adding me to a custom group, or changing the security of an entry, all of which change which of their entries can appear on my friends page.
There is no timestamp or history of changes associated with the latter two, so there's no way to tell whether such a change took place that would change the content of my friends page, let alone if that change happened before or after a certain time.

That said, it is possible that LiveJournal code ignores the If-modified-Since: header for some static pages, or for pages for which it is possible to determine accurately a modification time. In this case, you're in the right place for reporting this. Can you provide the complete headers for your HTTP request (excluding the cookie headers, as those may allow someone to impersonate you) and for the HTTP response you receive from the server (again, excluding the set-cookie headers, for the same reason)?

(Reply to this)(Thread)


[info]dimrub
2008-04-06 09:09 pm UTC (link)
In general, your explanation makes sense, but it doesn't seems to be applicable in this case, since LJ's server is only too happy to provide the Last-Modified header, which means it has all the necessary information in order to answer with a 304 in case an appropriate If-Modified-Since was provided.

You can repro this issue by running

wget --header "If-Modified-Since: date" -S http://username.livejournal.com/data/rss/

with the appropriate values for date and username.

(Reply to this)(Parent)


[info]dimrub
2008-04-06 09:14 pm UTC (link)
Oh, I forgot to mention that the pages I refer to are the RSS feeds LJ generates. And now that I tried it again it seems to work OK. Perhaps, it only manifests itself on authenticated feeds.

(Reply to this)(Parent)(Thread)


[info]pauamma
2008-04-07 12:08 am UTC (link)
Perhaps. It would make sense, since looking at an authenticated feed vs. an unauthenticated one is like looking at a journal when you're logged in and when you're logged out. (Which is another of those cases when it would be hard to determine whether a change in visible content occured before or after a certain time.) There may be a bug there, but if there is, it's probably providing a Last-Modified: header in the response, not ignoring the If-Modified-Since: header in later requests.

(Reply to this)(Parent)(Thread)


[info]dimrub
2008-04-07 06:02 am UTC (link)
OK, I double checked - it seems the bug was in my client code, LJ is doing fine.

(Reply to this)(Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…