Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC fetcher compatibility with drafts #7305

Closed
mikolaj-kow opened this issue Jan 6, 2021 · 5 comments · Fixed by #7674
Closed

RFC fetcher compatibility with drafts #7305

mikolaj-kow opened this issue Jan 6, 2021 · 5 comments · Fixed by #7674
Labels
fetcher good first issue An issue intended for project-newcomers. Varies in difficulty. type: feature

Comments

@mikolaj-kow
Copy link

RFC fetcher does not process drafts IDs, because prefixedIdentifier does not begin with rfc prefix.

Example URL for draft's raw bibtex resource https://datatracker.ietf.org/doc/draft-ietf-sidrops-aspa-verification/bibtex
URL structure is the same as in RFC resource, so no change in fetching part is required.

Ref: #3971 5d23970 @jacksonrya

Thanks in advance.

@Siedlerchr Siedlerchr added fetcher good first issue An issue intended for project-newcomers. Varies in difficulty. labels Jan 6, 2021
@Siedlerchr Siedlerchr added this to Normal priority in Features & Enhancements via automation Jan 6, 2021
@jacksonrya
Copy link
Contributor

I'll take a look at this soon

@ruanych
Copy link
Contributor

ruanych commented Apr 25, 2021

@Siedlerchr Hi, I verified the download URL of the RFC resource.

There will be different URLs for different versions, the main difference is the official release version and the draft version.

For example, rfc1945
rfc-bib

It has three versions

  • draft-fielding-http-spec
  • draft-ietf-http-v10-spec
  • rfc1945

Their bibtex item download links are:

For the official release version of RFC, visit the download link of the draft version, they will be redirected to the official release version. In other words, access to https://datatracker.ietf.org/doc/draft-ietf-http-v10-spec/bibtex/ will be redirected to https://datatracker.ietf.org/doc/rfc1945/bibtex/.

In JabRef, the download link format of the bibtex item is forced to https://datatracker.ietf.org/doc/rfc{number}/bibtex/.

prefixedIdentifier = (!identifier.toLowerCase().startsWith("rfc")) ? "rfc" + prefixedIdentifier : prefixedIdentifier;
URIBuilder uriBuilder = new URIBuilder("https://datatracker.ietf.org/doc/" + prefixedIdentifier + "/bibtex/");

So for some bibtex items that only have a draft version, JabRef will not be able to download correctly. E.g https://datatracker.ietf.org/doc/draft-ietf-sidrops-aspa-verification/bibtex/.

@Siedlerchr
Copy link
Member

So when the draft redirects to the "release" version, it should be sufficient to fetch the draft and follow any redirects?

@ruanych
Copy link
Contributor

ruanych commented Apr 25, 2021

The problem now is that for some bibtex items that do not have the "release" version, JabRef will not be able to download correctly.
In other words, the current JabRef can only download the bibtex item with the "release" version and cannot download the draft version without the "release" version. E.g https://datatracker.ietf.org/doc/draft-ietf-sidrops-aspa-verification/bibtex/.

We may need to add an option RFC draft, or use some logic to determine whether to add the prefix "rfc" in the construction of the item in the middle of the download link.

@ruanych
Copy link
Contributor

ruanych commented Apr 28, 2021

@Siedlerchr I think this bug can be solved by judging whether the identifier prefix contains "draft". I also added some testcases. See PR 7674.

Features & Enhancements automation moved this from Normal priority to Done May 3, 2021
Siedlerchr added a commit that referenced this issue May 4, 2021
* upstream/main: (354 commits)
  Fix ScienceDirect fetcher (#7684)
  Refactor NoBibTexFieldCheckerTest to increase mutation coverage (#7697)
  Update Gradle from 6.8.3 to 7.0 (#7619)
  Fixes #7305: the RFC fetcher is not compatible with the draftFix for issue 7305 (#7674)
  Refactoring existing unit tests (#7693)
  cover boundary cases & add more unit tests (#7694)
  Bump classgraph from 4.8.104 to 4.8.105 (#7688)
  Bump java-diff-utils from 4.9 to 4.10 (#7692)
  Fix arXiv fetcher tests (#7686)
  Make key for ScienceDirect configurable (#7683)
  migration of timestamp (#7671)
  Fix CCSB and DOAJ (#7426)
  [Bot] Update CSL styles (#7680)
  MS Office XML: Export month name (#7677)
  linkfix (#7678)
  readd fix (#7675)
  Fix threading cleanup in performSearch (#7672)
  add missing changelog
  delete bug fix (#7580)
  Add more unit tests to three gui classes  (#7636)
  ...

# Conflicts:
#	build.gradle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fetcher good first issue An issue intended for project-newcomers. Varies in difficulty. type: feature
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants