mirror of
https://github.com/majd/ipatool
synced 2026-11-26 09:17:52 +08:00
fix: use current store request user agents
This commit is contained in:
1 parent
001d889896
commit
72c47d538b
4 files changed
+4
No files matched your search
@@ -288,6 +288,7 @@ func ownedAppsHeaders(acc Account, guid string, now time.Time) map[string]string
|
||||
"Client-Cloud-Purchase-Daap-Version": "1.1/Configurator-2.0",
|
||||
"Client-DAAP-Version": "3.12",
|
||||
"Date": utc.Format(gohttp.TimeFormat),
|
||||
"User-Agent": storeAuthenticationUserAgent,
|
||||
"iCloud-DSID": acc.DirectoryServicesID,
|
||||
"X-Apple-I-Client-Time": utc.Format("2006-01-02T15:04:05Z"),
|
||||
"X-Apple-I-Locale": "en_US",
|
||||
|
||||
@@ -581,6 +581,7 @@ func expectOwnedAppsHeaders(headers map[string]string, account Account, guid str
|
||||
Expect(headers).To(HaveKeyWithValue("X-Guid", guid))
|
||||
Expect(headers).To(HaveKeyWithValue("Client-DAAP-Version", "3.12"))
|
||||
Expect(headers).To(HaveKeyWithValue("Client-Cloud-Purchase-Daap-Version", "1.1/Configurator-2.0"))
|
||||
Expect(headers).To(HaveKeyWithValue("User-Agent", storeAuthenticationUserAgent))
|
||||
}
|
||||
|
||||
func ownedAppsDMAPResponse(apps []App) []byte {
|
||||
|
||||
@@ -116,6 +116,7 @@ func (t *appstore) purchaseRequest(acc Account, app App, storeFront, guid string
|
||||
ResponseFormat: http.ResponseFormatXML,
|
||||
Headers: map[string]string{
|
||||
"Content-Type": "application/x-apple-plist",
|
||||
"User-Agent": storeAuthenticationUserAgent,
|
||||
"iCloud-DSID": acc.DirectoryServicesID,
|
||||
"X-Dsid": acc.DirectoryServicesID,
|
||||
"X-Apple-Store-Front": storeFront,
|
||||
|
||||
@@ -109,6 +109,7 @@ var _ = Describe("AppStore (Purchase)", func() {
|
||||
Do(func(req http.Request) {
|
||||
expectedURL := "https://p" + testPod + "-" + PrivateAppStoreAPIDomain + PrivateAppStoreAPIPathPurchase
|
||||
Expect(req.URL).To(Equal(expectedURL))
|
||||
Expect(req.Headers).To(HaveKeyWithValue("User-Agent", storeAuthenticationUserAgent))
|
||||
Expect(req.Payload).To(BeAssignableToTypeOf(&http.XMLPayload{}))
|
||||
payload := req.Payload.(*http.XMLPayload)
|
||||
Expect(payload.Content["guid"]).To(Equal(testGUID))
|
||||
|
||||
Reference in new issue
Block a user