You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
conn.SQL := 'Select Content from PackageVersions where Id = '''+SQLWrapString(id)+''' and Version = '''+SQLWrapString(version)+'''';
651
+
conn.SQL := 'Select PackageVersionKey, Content from PackageVersions where Id = '''+SQLWrapString(id)+''' and Version = '''+SQLWrapString(version)+'''';
652
+
conn.Prepare;
653
+
conn.Execute;
654
+
if conn.FetchNext then
655
+
sendRow
656
+
else
657
+
begin
658
+
conn.Terminate;
659
+
conn.SQL := 'Select PackageVersionKey, Content from PackageVersions where Id = '''+SQLWrapString(id)+''' and Version like '''+SQLWrapString(version)+'-%'' order by PubDate desc';
conn.SQL := 'Update PackageVersions set DownloadCount = DownloadCount + 1 where Id = '''+SQLWrapString(id)+''' and Version = '''+SQLWrapString(version)+'''';
644
-
conn.Prepare;
645
-
conn.Execute;
646
-
conn.Terminate;
647
-
conn.SQL := 'Update Packages set DownloadCount = DownloadCount + 1 where Id = '''+SQLWrapString(id)+'''';
648
-
conn.Prepare;
649
-
conn.Execute;
650
-
end
663
+
sendRow
651
664
else
652
665
begin
653
666
response.ResponseNo := 404;
654
667
response.ResponseText := 'Not found';
655
668
response.ContentType := 'text/plain';
656
669
response.ContentText := 'The package "'+id+'#'+version+'" is not known by this server';
0 commit comments